ruby-shell 0.24 → 0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/rsh +8 -7
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 585443f4d2aa3921ec34a8267e09aab78a12e3f79cdcdb59da6ea8296abb76bf
|
4
|
+
data.tar.gz: a401d6baf0b938900678e48d0a81dab507f116afa1c60017bfb4657f48a3c84e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e96de7caf23de35f75872a314b056d503576631fb758104fd11f349a18a9563f0b0073be4b346f92aaee24ccc716530ba9006410450ad80f763cefe488f1f3d
|
7
|
+
data.tar.gz: b176b1a6f61a8f175de4f2509230f713c82d83be6758eb8cebf86847982cb7eb10bfc79a79c09103dc663f10ce599d03471e948098046fe3d0ad4759eda6a945
|
data/README.md
CHANGED
@@ -23,9 +23,9 @@ Or simply `gem install ruby-shell`.
|
|
23
23
|
* Tab completions for nicks, system commands, command switches and dirs/files
|
24
24
|
* Tab completion presents matches in a list to pick from
|
25
25
|
* When you start to write a command, rsh will suggest the first match in the history and present that in "toned down" letters - press the arrow right key to accept the suggestion.
|
26
|
-
* Writing a partial command and pressing `UP` will search history for matches. Go down/up in the list and press `TAB` or `ENTER` to accept or `Ctrl-
|
26
|
+
* Writing a partial command and pressing `UP` will search history for matches. Go down/up in the list and press `TAB` or `ENTER` to accept, `Ctrl-g` or `Ctrl-c` to discard
|
27
27
|
* History with editing, search and repeat a history command (with `!`)
|
28
|
-
* Config file (.rshrc) updates on exit (with Ctrl-d) or not (with Ctrl-
|
28
|
+
* Config file (.rshrc) updates on exit (with Ctrl-d) or not (with Ctrl-e)
|
29
29
|
* Set of simple rsh specific commands like nick, nick?, history and rmhistory
|
30
30
|
* rsh specific commands and full set of Ruby commands available via :<command>
|
31
31
|
* All colors are themeable in .rshrc (see github link for possibilities)
|
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.25"
|
18
18
|
|
19
19
|
# MODULES, CLASSES AND EXTENSIONS
|
20
20
|
class String # Add coloring to strings (with escaping for Readline)
|
@@ -147,9 +147,9 @@ end
|
|
147
147
|
* When you start to write a command, rsh will suggest the first match in the history and
|
148
148
|
present that in "toned down" letters - press the arrow right key to accept the suggestion
|
149
149
|
* Writing a partial command and pressing `UP` will search history for matches.
|
150
|
-
Go down/up in the list and press `TAB` or `ENTER` to accept or `Ctrl-
|
151
|
-
* History with editing, search and repeat a history command (with `!`)
|
152
|
-
* Config file (.rshrc) updates on exit (with Ctrl-d) or not (with Ctrl-
|
150
|
+
Go down/up in the list and press `TAB` or `ENTER` to accept, `Ctrl-g` or `Ctrl-c` to discard
|
151
|
+
* History with editing, search and repeat a history command (with `!`)
|
152
|
+
* Config file (.rshrc) updates on exit (with Ctrl-d) or not (with Ctrl-e)
|
153
153
|
* Set of simple rsh specific commands like nick, nick?, history and rmhistory
|
154
154
|
* rsh specific commands and full set of Ruby commands available via :<command>
|
155
155
|
* All colors are themeable in .rshrc (see github link for possibilities)
|
@@ -229,6 +229,7 @@ def getchr # Process key presses
|
|
229
229
|
when "", "" then chr = "BACK"
|
230
230
|
when "" then chr = "C-C"
|
231
231
|
when "" then chr = "C-D"
|
232
|
+
when "" then chr = "C-E"
|
232
233
|
when "" then chr = "C-G"
|
233
234
|
when "" then chr = "C-K"
|
234
235
|
when "" then chr = "C-L"
|
@@ -267,10 +268,10 @@ def getstr # A custom Readline-like function
|
|
267
268
|
@c.col(@pos0 + @pos)
|
268
269
|
chr = getchr
|
269
270
|
case chr
|
270
|
-
when 'C-G'
|
271
|
+
when 'C-G', 'C-C'
|
271
272
|
@history[0] = ""
|
272
273
|
return
|
273
|
-
when 'C-
|
274
|
+
when 'C-E' # Ctrl-C exits gracefully but without updating .rshrc
|
274
275
|
print "\n"
|
275
276
|
exit
|
276
277
|
when 'C-D' # Ctrl-D exits after updating .rshrc
|
@@ -608,7 +609,7 @@ end
|
|
608
609
|
|
609
610
|
# INITIAL SETUP
|
610
611
|
begin # Load .rshrc and populate @history
|
611
|
-
trap "SIGINT" do print "\n"; exit end
|
612
|
+
#trap "SIGINT" do print "\n"; exit end
|
612
613
|
firstrun unless File.exist?(Dir.home+'/.rshrc') # Initial loading - to get history
|
613
614
|
load(Dir.home+'/.rshrc')
|
614
615
|
ENV["SHELL"] = __FILE__
|
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.25'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -12,7 +12,8 @@ date: 2023-06-19 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.25: Ctrl-C no longer exits rsh, it cancels the current input. Ctrl-e exits without
|
16
|
+
config save.'
|
16
17
|
email: g@isene.com
|
17
18
|
executables:
|
18
19
|
- rsh
|