pry-editline 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +12 -1
- data/lib/pry-editline.rb +23 -3
- data/pry-editline.gemspec +1 -1
- metadata +4 -4
data/README.markdown
CHANGED
@@ -30,6 +30,11 @@ You can add an alias for it in `~/.inputrc`. Observe:
|
|
30
30
|
Actually, I already added `C-o` for you. So don't add that one. It
|
31
31
|
already works. It stands for "open".
|
32
32
|
|
33
|
+
> What about vi readline bindings?
|
34
|
+
|
35
|
+
They're supported, too. In addition to `C-x C-e` and `C-o` in insert
|
36
|
+
mode, you can use `o` in normal mode.
|
37
|
+
|
33
38
|
> It's not working on OS X.
|
34
39
|
|
35
40
|
By default, readline on OS X uses libedit. I don't know what that means
|
@@ -40,7 +45,7 @@ RVM, pass it to `rvm install`. Or better yet, make it the default:
|
|
40
45
|
|
41
46
|
echo rvm_configure_flags=--with-readline-dir=/usr/local >> ~/.rvmrc
|
42
47
|
|
43
|
-
To *install*
|
48
|
+
To *install* readline to `/usr/local`, you might consider using
|
44
49
|
Homebrew. After installing, you need instruct it to link that readline
|
45
50
|
into `/usr/local`:
|
46
51
|
|
@@ -85,6 +90,12 @@ explicitly `require 'pry-editline'` in your `.pryrc`, too.
|
|
85
90
|
Well first, it overrides `ENV['INPUTRC']` so it can do some magic. And
|
86
91
|
then, it does some magic!
|
87
92
|
|
93
|
+
Self Promotion
|
94
|
+
--------------
|
95
|
+
|
96
|
+
Follow [tpope](http://tpo.pe/) on [GitHub](https://github.com/tpope),
|
97
|
+
[Twitter](http://twitter.com/tpope), and [Google+](http://tpo.pe/plus).
|
98
|
+
|
88
99
|
License
|
89
100
|
-------
|
90
101
|
|
data/lib/pry-editline.rb
CHANGED
@@ -17,9 +17,29 @@ module PryEditline
|
|
17
17
|
|
18
18
|
require 'tempfile'
|
19
19
|
file = Tempfile.new('inputrc')
|
20
|
-
file.puts
|
21
|
-
|
22
|
-
|
20
|
+
file.puts <<-EOF
|
21
|
+
set keymap vi-insert
|
22
|
+
"\C-a": beginning-of-line
|
23
|
+
"\C-b": backward-char
|
24
|
+
"\C-d": delete-char
|
25
|
+
"\C-e": end-of-line
|
26
|
+
"\C-f": forward-char
|
27
|
+
"\C-k": kill-line
|
28
|
+
"\C-n": next-history
|
29
|
+
"\C-p": previous-history
|
30
|
+
"\C-x\C-l": redraw-current-line
|
31
|
+
"\C-x\C-e": "\C-e \C-a\t\C-k\C-x\C-l"
|
32
|
+
"\C-o": "\C-e \C-a\t\C-k\C-x\C-l"
|
33
|
+
set keymap vi-command
|
34
|
+
"o": "A \C-a\t\C-k\C-x\C-l\e"
|
35
|
+
set keymap emacs
|
36
|
+
"\C-x\C-l": redraw-current-line
|
37
|
+
"\C-x\C-e": "\C-e \C-a\t\C-k\C-x\C-l"
|
38
|
+
"\C-o": "\C-e \C-a\t\C-k\C-x\C-l"
|
39
|
+
$if mode=vi
|
40
|
+
set keymap vi
|
41
|
+
$endif
|
42
|
+
EOF
|
23
43
|
file.puts "$include #{inputrc}" if inputrc
|
24
44
|
file.close
|
25
45
|
ENV['INPUTRC'] = file.path
|
data/pry-editline.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-editline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-08 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &73396810 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *73396810
|
25
25
|
description:
|
26
26
|
email:
|
27
27
|
- ruby@tpope.org
|