ruby-shell 0.12 → 0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rsh +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60559c89ac1578e5677855dba379bd293acb3279bb132a072b7218c58055fce0
|
4
|
+
data.tar.gz: 4bc782571e3e56fc19177a24c22c386d4ac764bcb12a8042f8fed3c9563822dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a41cfe97a651db1d15d3ea5f06552d2b353d50fb8effa918ce701c907c3735f04e2c049c2922a3e9764e2372d7eadb2225589ad590179575bde9c70c05efd8b
|
7
|
+
data.tar.gz: 60e7c66ff3c6db7cbc9e50f226de7469a95737a202d0373c13e7155f430142e38b9a175eec986788887b1cebb4a88991e45262a6c6e5f2f29e1d8c6e287d00dc
|
data/bin/rsh
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
# for any damages resulting from its use. Further, I am under no
|
15
15
|
# obligation to maintain or extend this software. It is provided
|
16
16
|
# on an 'as is' basis without any expressed or implied warranty.
|
17
|
-
@version = "0.
|
17
|
+
@version = "0.13"
|
18
18
|
|
19
19
|
# MODULES, CLASSES AND EXTENSIONS
|
20
20
|
class String # Add coloring to strings (with escaping for Readline)
|
@@ -587,14 +587,15 @@ loop do
|
|
587
587
|
system("rtfm #{tf}")
|
588
588
|
Dir.chdir(File.read(tf))
|
589
589
|
File.delete(tf)
|
590
|
+
system("git status .") if Dir.exist?(".git")
|
590
591
|
next
|
591
592
|
end
|
592
593
|
@cmd = "echo \"#{@cmd[1...]},prx,off\" | xrpn" if @cmd =~ /^\=/ # Integration with xrpn (https://github.com/isene/xrpn)
|
593
594
|
if @cmd.match(/^\s*:/) # Ruby commands are prefixed with ":"
|
594
595
|
begin
|
595
596
|
eval(@cmd[1..-1])
|
596
|
-
rescue StandardError => err
|
597
|
-
|
597
|
+
#rescue StandardError => err
|
598
|
+
rescue Exception => err
|
598
599
|
puts "\n#{err}"
|
599
600
|
end
|
600
601
|
else # Execute command
|
@@ -603,6 +604,7 @@ loop do
|
|
603
604
|
dir = @cmd.strip.sub(/~/, Dir.home)
|
604
605
|
if Dir.exist?(dir)
|
605
606
|
Dir.chdir(dir)
|
607
|
+
system("git status .") if Dir.exist?(".git")
|
606
608
|
else
|
607
609
|
ca = @nick.transform_keys {|k| /((^\K\s*\K)|(\|\K\s*\K))\b(?<!-)#{Regexp.escape k}\b/}
|
608
610
|
@cmd = @cmd.gsub(Regexp.union(ca.keys), @nick)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.13'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -12,7 +12,7 @@ date: 2023-06-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
13
13
|
description: 'A shell written in Ruby with extensive tab completions, aliases/nicks,
|
14
14
|
history, syntax highlighting, theming and more. In continual development. New in
|
15
|
-
0.
|
15
|
+
0.13: Automatic git status when entering a git repo/dir.'
|
16
16
|
email: g@isene.com
|
17
17
|
executables:
|
18
18
|
- rsh
|