mini_readline 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f85684d28ccc8db527dfffaa18a44cacc0d895a
4
- data.tar.gz: 10ab8d5a4e563e544b421348932e9955db9e2ba5
3
+ metadata.gz: 1802772587ebd4ad811fc26687ec351a4ad1fe87
4
+ data.tar.gz: c2ebada28788a3bbdeab93b4a0cadf4119a19cad
5
5
  SHA512:
6
- metadata.gz: 6066051c11226c1910cffc07230c43c222968f52bd48589b6f2f40688ad88e51e1e51cc42880fe68f6d8a4df4658a71eefe047807ae57a67c8e153121d765515
7
- data.tar.gz: d8c18d10e928dadb05d629f8a0957b679a78d51642c7312f7667dbd6092728bc8dcb142fa2f5e72dfe26473284921765d4d58332c7c2c38082093c6286548fc5
6
+ metadata.gz: f3ae4ac73eb8c08280dd36e43587ca9bf49ed1bde32431f59c859021959f2f7a1e179d1de19cbcdc567a260564e1fe2a6e4eefd1ed378af5177eb48e75e7be82
7
+ data.tar.gz: 8265de2d7339933cdd9d6281199d01cbefc869949798f1e46a5c7f21541a3f1737463f53a27620edb63c65719d94eaf350580986592ced35619bae9752d777d4
data/README.md CHANGED
@@ -32,10 +32,10 @@ mappings) are listed below:
32
32
  Editor Action | Windows Key | Other Key
33
33
  -----------------|----------------------------------|------------
34
34
  Enter | Enter | Enter
35
- Left | Left Arrow, Pad Left | Left Arrow
36
- Word Left | Ctrl Left Arrow, Ctrl Pad Left | Ctrl Left Arrow, Ctrl-B, Alt-b
37
- Right | Right Arrow, Pad Right | Right Arrow
38
- Word Right | Ctrl Right Arrow, Ctrl Pad Right | Ctrl Right Arrow, Ctrl-F, Alt-f
35
+ Left | Left Arrow, Pad Left | Left Arrow, Ctrl-B
36
+ Word Left | Ctrl Left Arrow, Ctrl Pad Left | Ctrl Left Arrow, Alt-b
37
+ Right | Right Arrow, Pad Right | Right Arrow, Ctrl-F
38
+ Word Right | Ctrl Right Arrow, Ctrl Pad Right | Ctrl Right Arrow, Alt-f
39
39
  Go to start | Home, Pad Home | Home, Ctrl-A
40
40
  Go to end | End, Pad End | End, Ctrl-E
41
41
  Previous History | Up Arrow, Pad Up | Up Arrow, Ctrl-R
@@ -48,7 +48,8 @@ End of Input | Ctrl-Z | Alt-z
48
48
 
49
49
  ### Notes
50
50
  * The label "Other" is an umbrella that bundles together the Linux, Mac,
51
- and Cygwin platforms.
51
+ and Cygwin platforms. On systems lacking an Alt key, these sequences may be
52
+ replaced by Escape followed by the appropriate letter.
52
53
  * References to Pad keys under Windows assume that Num Lock is not engaged.
53
54
  * Support for End of Input is controlled by the eoi_detect option. See options
54
55
  below.
@@ -334,12 +335,14 @@ welcomed!!!**
334
335
 
335
336
  ## Contributing
336
337
 
337
- Bug reports and pull requests are welcome on GitHub at
338
+ Comments, suggestions, criticisms, bug reports, and pull requests are welcome
339
+ on GitHub at:
340
+
338
341
  https://github.com/PeterCamilleri/mini_readline.
339
342
 
340
343
 
341
344
  ## License
342
345
 
343
- The gem is available as open source under the terms of the
344
- [MIT License](http://opensource.org/licenses/MIT).
346
+ The gem is available as open source under the terms of the MIT License. Please
347
+ see LICENSE.txt for further details.
345
348
 
data/lib/mini_readline.rb CHANGED
@@ -14,6 +14,12 @@ require_relative "mini_readline/read_line"
14
14
  #* mini_readline.rb - The root file that gathers up all the system's parts.
15
15
  module MiniReadline
16
16
 
17
+ private_constant :Prompt
18
+ private_constant :Edit
19
+ private_constant :EditWindow
20
+ private_constant :History
21
+ private_constant :NoHistory
22
+
17
23
  #The shared instance of Readline.
18
24
  @reader = Readline.new()
19
25
 
@@ -11,17 +11,17 @@ module MiniReadline
11
11
  #Left Arrows
12
12
  MAP["\e[D"] = [:go_left]
13
13
  MAP["\e[D"] = [:go_left]
14
+ MAP["\x02"] = [:go_left]
14
15
 
15
16
  MAP["\e[1;5D"] = [:word_left]
16
- MAP["\x02"] = [:word_left]
17
17
  MAP["\eb"] = [:word_left]
18
18
 
19
19
  #Right Arrows
20
20
  MAP["\e[C"] = [:go_right]
21
21
  MAP["\eOC"] = [:go_right]
22
+ MAP["\x06"] = [:go_right]
22
23
 
23
24
  MAP["\e[1;5C"] = [:word_right]
24
- MAP["\x06"] = [:word_right]
25
25
  MAP["\ef"] = [:word_right]
26
26
 
27
27
  #Up Arrows
@@ -1,4 +1,4 @@
1
1
  module MiniReadline
2
2
  #The current version of the mini_readline gem.
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
data/sire.rb CHANGED
@@ -105,7 +105,7 @@ class SIRE
105
105
  puts "Use the command 'q' to quit.\n\n"
106
106
 
107
107
  until @_done
108
- exec_line(Readline.readline("\e[7mSIRE>\e[0m", true))
108
+ exec_line(Readline.readline("SIRE>", true))
109
109
  end
110
110
 
111
111
  puts "\n\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_readline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest