Commit graph

34 commits

Author SHA1 Message Date
aycabta
fc2a121c7c [ruby/reline] If history-size isn't numeric, it should be 500
https://tiswww.case.edu/php/chet/readline/readline.html#IDX25

> If an attempt is made to set history-size to a non-numeric value, the maximum
> number of history entries will be set to 500.

acf0437280
2020-05-17 19:26:53 +09:00
aycabta
009092b04c [ruby/reline] Add URL reference of history-size
13420197b8
2020-04-29 19:13:14 +09:00
aycabta
4859352df6 [ruby/reline] Negative history_size means unlimited
And unlimited is default.

f5149c3ca6
2020-04-29 19:13:14 +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.

45af6eea77
2020-04-29 19:13:14 +09:00
aycabta
9fb20711fd [ruby/reline] Treat home dir correctly
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.

97f1e7db04
2020-04-24 16:45:07 +09:00
aycabta
90913bfabe [ruby/reline] Suppress error in case INPUTRC env is empty
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
0835a971ef Remove TODO comment 2019-12-22 01:57:35 +09:00
aycabta
ad8fbf444a Fix variable catch 2019-12-05 09:02:23 +09:00
Nobuyoshi Nakada
b40589802b
[reline] Do not compile regexp for each line 2019-07-28 09:52:19 +09:00
aycabta
6c2b59f923 Support Control- and Meta- 2019-07-04 20:58:11 +09:00
aycabta
d9f8b88b47 Move a comment to proper place 2019-07-04 19:34:08 +09:00
Nobuyoshi Nakada
265b9a0edf
Parse key sequence more strictly 2019-07-04 18:54:50 +09:00
Nobuyoshi Nakada
12e06d32f5
Use lstrip instead of gsub which can match only once 2019-07-04 18:49:42 +09:00
Nobuyoshi Nakada
ee861e43f7
Skip indented comment lines [Bug #15981] 2019-07-04 18:47:22 +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
Nobuyoshi Nakada
a1e6e45341 Prefer $INPUTRC over the default in the home
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Nobuyoshi Nakada
d04ebc57f2 Add true condition Reline 2019-06-02 20:31:25 +09:00
aycabta
486a2c26d6 Add Reline test for unknown macro 2019-06-02 08:50:01 +09:00
aycabta
e360688c4d Add new test for Reline within pipe 2019-06-02 07:39:12 +09:00
aycabta
28e01f006d Add comments to key bindings vars of Reline::Config 2019-06-02 07:28:26 +09:00
Nobuyoshi Nakada
3034d666e8
Just use File.readlines 2019-06-01 14:57:36 +09:00
aycabta
7df65ef676 Use inputrc data for keystroke setting 2019-06-01 09:06:27 +09:00
aycabta
eb4e774711 Support Meta key in Reline 2019-05-24 23:38:40 +09:00
aycabta
2ecee730a5 Remove ~/.inputrc not found error message 2019-05-21 20:52:14 +09:00
aycabta
caef2ddaaf Implement Reline::HISTORY as an expanded Array 2019-05-13 03:26:10 +09:00
aycabta
c48778d642 Add attr_accessor for Reline's Config attrs 2019-05-13 03:24:15 +09:00
aycabta
11476e9902 Check INPUTRC env in Reline::Config 2019-05-12 23:21:41 +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
Nobuyoshi Nakada
f4f66bd11c
Revert "IRB is improved with Reline and RDoc, take 2"
Accidentally merged when 89271d4a37
"Adjusted indents".
2019-04-23 21:55:29 +09:00
aycabta
f2cd4f4cd0
IRB is improved with Reline and RDoc, take 2 2019-04-23 20:08:02 +09:00
aycabta
51cec00953 Revert "IRB is improved with Reline and RDoc"
This reverts commit 7f273ac6d0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 09:13:49 +00:00
aycabta
7f273ac6d0 IRB is improved with Reline and RDoc
Reline is a readline stdlib compatible library. It also supports
multiline input. IRB is improved with Reline and supports multiline.
Besides, supports showing documents when completed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-20 08:51:20 +00:00