ruby-shell 0.24 → 0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/bin/rsh +8 -7
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 206ad1334e7e4b4c43d32820d57946ae9a7cca94acd988bf4ebcdcc9aa4a72d7
4
- data.tar.gz: 17eb90fec5ca92c0995c2bac991af47147389a193b4ff41641fd72f4bc9647e2
3
+ metadata.gz: 585443f4d2aa3921ec34a8267e09aab78a12e3f79cdcdb59da6ea8296abb76bf
4
+ data.tar.gz: a401d6baf0b938900678e48d0a81dab507f116afa1c60017bfb4657f48a3c84e
5
5
  SHA512:
6
- metadata.gz: 223b18a2c568229ef80bbbbe68c2807e8b747f7f435caba3123d6e250f0cd595bead703d5c3be9d10961d08179f200fbe73eefa40264c0e054a98e2da07e76aa
7
- data.tar.gz: 7ab4adf5d00f22ebe20f34702539d329fe82a0dc53d0ef7e558952287bebf6f6b28b0cd783673cedf4e86052cafc494d18969f5f4bc53b54dac1b8193112dc8d
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-G` to discard
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-c)
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.24"
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-G` 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-c)
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-C' # Ctrl-C exits gracefully but without updating .rshrc
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.24'
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.24: Minor bug fix in tab completion.'
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