aycabta
80a7358cfc
[ruby/reline] Keep original characters in inputrc
...
https://github.com/ruby/reline/commit/96583c6336
2020-08-18 19:08:40 +09:00
Nobuyoshi Nakada
0ac5009165
[ruby/reline] Ignore non-absolute XDG_CONFIG_HOME
...
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
> All paths set in these environment variables must be absolute.
> If an implementation encounters a relative path in any of these
> variables it should consider the path invalid and ignore it.
https://github.com/ruby/reline/commit/45af6eea77
2020-04-29 19:13:14 +09:00
aycabta
9fb20711fd
[ruby/reline] Treat home dir correctly
...
https://github.com/ruby/reline/commit/9b1327d2f4
2020-04-24 16:46:36 +09:00
aycabta
81b0b79197
[ruby/reline] Support XDG_CONFIG_HOME
...
In the XDG Specification, if ~/.config/readline/inputrc exists, then ~/.inputrc
should not be read, but for compatibility with GNU Readline, if ~/.inputrc
exists, then it is given priority.
https://github.com/ruby/reline/commit/97f1e7db04
2020-04-24 16:45:07 +09:00
aycabta
90913bfabe
[ruby/reline] Suppress error in case INPUTRC env is empty
...
https://github.com/ruby/reline/commit/bce7e7562b
2020-03-26 17:41:21 +09:00
aycabta
7392083c2f
Support history-size in .inputrc correctly
2020-01-06 21:50:48 +09:00
aycabta
ad8fbf444a
Fix variable catch
2019-12-05 09:02:23 +09:00
aycabta
6c2b59f923
Support Control- and Meta-
2019-07-04 20:58:11 +09:00
aycabta
6fa7ed453e
Check commented out line in inputrc correctly
2019-07-04 19:29:07 +09:00
Nobuyoshi Nakada
265b9a0edf
Parse key sequence more strictly
2019-07-04 18:54:50 +09:00
Nobuyoshi Nakada
ee861e43f7
Skip indented comment lines [Bug #15981 ]
2019-07-04 18:47:22 +09:00
aycabta
19977cc761
Remove unnecessary variables
2019-06-08 00:14:58 +09:00
Kazuhiro NISHIYAMA
533070bfc6
Use lines instead of split
...
```
% cat ~/bench-split.yml
prelude: |
s = "foo\nbar\nbaz\n"
benchmark:
'/(?<=\n)/': |
s.split(/(?<=\n)/)
'/^/': |
s.split(/^/)
'lines': |
s.lines
Warming up --------------------------------------
/(?<=\n)/ 459.123k i/s - 467.844k times in 1.018994s (2.18μs/i)
/^/ 467.922k i/s - 469.744k times in 1.003894s (2.14μs/i)
lines 2.343M i/s - 2.424M times in 1.034677s (426.84ns/i)
Calculating -------------------------------------
/(?<=\n)/ 422.347k i/s - 1.377M times in 3.261232s (2.37μs/i)
/^/ 477.603k i/s - 1.404M times in 2.939186s (2.09μs/i)
lines 2.485M i/s - 7.028M times in 2.828757s (402.47ns/i)
Comparison:
lines: 2484631.6 i/s
/^/: 477603.3 i/s - 5.20x slower
/(?<=\n)/: 422346.5 i/s - 5.88x slower
```
2019-06-03 10:32:32 +09:00
Nobuyoshi Nakada
f4b060d8d7
Check conditional nestings in INPUTRC
...
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Kazuhiro NISHIYAMA
4fda39fc87
Use simpler regexp
2019-06-02 22:37:42 +09:00
Nobuyoshi Nakada
d04ebc57f2
Add true condition `Reline`
2019-06-02 20:31:25 +09:00
aycabta
de01c4ec00
Reset Config at Reline::Config::Test#teardown
2019-06-01 16:47:59 +09:00
aycabta
7df65ef676
Use inputrc data for keystroke setting
2019-06-01 09:06:27 +09:00
aycabta
17350c7e55
Add Reline as a fallback library for Readline
...
* lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible
library.
* lib/readline.rb: Readline uses a fallback to Reline when ext/readline
doesn't exist.
* tool/sync_default_gems.rb: add ruby/reline as a default gem.
* appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit
of Reline, and add "--exclude readline" to "nmake test-all" on Visual
Studio builds because of strange behavior.
* spec/ruby/library/readline/spec_helper.rb: skip Reline as with
RbReadline.
2019-04-30 11:44:20 +09:00