Commit graph

7218 commits

Author SHA1 Message Date
Takashi Kokubun
b83119be9e
Incremental syntax highlight for IRB source lines
Closes: https://github.com/ruby/ruby/pull/2202
2019-05-24 23:54:52 -07:00
aycabta
7686e33ee4 JSON like label ends by differs from the start
pp Ripper.lex('{ "a": 3 }')
 =>
[[[1, 0], :on_lbrace, "{", EXPR_BEG|EXPR_LABEL],
 [[1, 1], :on_sp, " ", EXPR_BEG|EXPR_LABEL],
 [[1, 2], :on_tstring_beg, "\"", EXPR_BEG|EXPR_LABEL],
 [[1, 3], :on_tstring_content, "a", EXPR_BEG|EXPR_LABEL],
 [[1, 4], :on_label_end, "\":", EXPR_BEG|EXPR_LABEL],
 [[1, 6], :on_sp, " ", EXPR_BEG|EXPR_LABEL],
 [[1, 7], :on_int, "3", EXPR_END],
 [[1, 8], :on_sp, " ", EXPR_END],
 [[1, 9], :on_rbrace, "}", EXPR_END]]
2019-05-25 10:42:57 +09:00
aycabta
19430b776c Fix wrong variable name 2019-05-25 08:24:41 +09:00
aycabta
822468307b Add round-robin variable 2019-05-25 08:08:54 +09:00
aycabta
559dca509d Show documents when completion 2019-05-25 03:30:01 +09:00
aycabta
260235ce87 Use Reline as Reidline multiline editor in IRB 2019-05-25 02:16:19 +09:00
aycabta
ff43b22627 Enter key always means evaluate in Reline#readmultiline 2019-05-25 02:13:14 +09:00
aycabta
637ee7ee38 Fix C-v C-j 2019-05-25 01:13:02 +09:00
aycabta
27bab6a569 Revert "Change Reline's version with "Reline 0.0.0""
This reverts commit 481ccf73d8.
2019-05-25 00:44:09 +09:00
aycabta
481ccf73d8 Change Reline's version with "Reline 0.0.0" 2019-05-25 00:40:14 +09:00
aycabta
4b012c23b2 Check block in #readmultiline 2019-05-25 00:39:42 +09:00
aycabta
eb4e774711 Support Meta key in Reline 2019-05-24 23:38:40 +09:00
Nobuyoshi Nakada
491d2b8063
Removed symlinks by in-place build [Bug #15870] 2019-05-24 14:25:46 +09:00
Martin Dürst
e713c2bde8 switch UNICODE_BETA to NO
Unicode version 12.1.0 was officially released on May 7th, 2019.
There were no changes at all from the "real" beta published shortly
after the new era name "Reiwa" was announced. So we can switch
UNICODE_BETA back to NO.

common.mk: switch UNICODE_BETA back to NO
tool/downloader.rb: add additional conditions to avoid an error
                    when moving from beta to final
2019-05-24 14:12:06 +09:00
Nobuyoshi Nakada
fe3ff5afb0
Suppress paranoid warnings for external/3rd-party libraries
[Feature #15665]
2019-05-23 17:36:26 +09:00
NAKAMURA Usaku
c5cbabf8a8
Use colorized IRB on Windows without checking TERM 2019-05-23 15:33:40 +09:00
aycabta
bb29ed6e33 C-v C-j means an newline insertion 2019-05-23 08:33:20 +09:00
aycabta
da3fabc976 Change behavior to confirm multiline termination
Always checks termination if you press Enter at last line.
2019-05-23 08:25:06 +09:00
aycabta
c48d9139d4 Remove unnecessary variable in LineEditor 2019-05-22 07:03:29 +09:00
aycabta
c00d805672 Support CSI sequences in prompt 2019-05-22 06:48:27 +09:00
aycabta
f8732bd4d6 Reline#reset should initalize @rest_height and @screen_size eveytime 2019-05-22 02:52:29 +09:00
aycabta
be86e71c67 Reopen $stderr with specified fd by RELINE_STDERR_TTY 2019-05-22 02:13:57 +09:00
aycabta
2ecee730a5 Remove ~/.inputrc not found error message 2019-05-21 20:52:14 +09:00
Takashi Kokubun
32ed85f601
Copy config to make IRB::Context#use_colorize? functional
on initialize

This fixes https://github.com/ruby/ruby/pull/2188
2019-05-21 04:32:17 -07:00
aycabta
4613c4bd5c Symbol beginning token may take a constant token 2019-05-21 18:55:31 +09:00
aycabta
bb5b4f9044 Cursor should be at line head after line breaking 2019-05-21 18:45:00 +09:00
aycabta
fd95ab44c6 IRB should eval and show an error when only . is inputted 2019-05-21 18:37:35 +09:00
aycabta
6d93baaedd Support DEL key 2019-05-21 17:46:41 +09:00
aycabta
29c81265c1 Check whether IRB.conf is nil in IRB::WorkSpace#code_around_binding 2019-05-21 09:14:08 +09:00
aycabta
3a9008b984 Add --colorize and --nocolorize options to IRB 2019-05-21 08:57:21 +09:00
aycabta
df6a673ca5 Fix vertical cursor moving when splitting line 2019-05-21 08:10:36 +09:00
aycabta
34d7ec4e9b Finish only when buffer contains non-blank line 2019-05-21 01:50:07 +09:00
aycabta
b69dfdb4b3 Cursor up should reduce 1 than editing height 2019-05-21 01:49:27 +09:00
aycabta
6592f5fcc8 Check bytesize in vi command mode last char back 2019-05-21 01:10:09 +09:00
aycabta
9f49ff4965 Cursor can't move to eol when vi command mode 2019-05-20 07:50:14 +09:00
aycabta
075e1acb4c Readline.completion_proc accepts US-ASCII 2019-05-20 04:47:58 +09:00
aycabta
16917cc3cb Add Reline.test_mode to use with special I/O 2019-05-18 12:48:27 +09:00
Nobuyoshi Nakada
c9b28fd7ae
Allow --enable/--disable options to take an argument
[Bug #15850]
2019-05-15 17:31:11 +09:00
aycabta
f54aa6c5b2 Rename confuzed name Reline::IO with Reline::IOGate 2019-05-15 15:52:18 +09:00
aycabta
b5a3ec7f18 Remove useless use of a variable in Reline::ANSI 2019-05-14 17:15:49 +09:00
aycabta
1e65196b54 Check encoding when Readline completion 2019-05-14 14:53:34 +09:00
aycabta
602ef62ae6 Rescue CompatibilityError for Readline's completion 2019-05-14 14:11:28 +09:00
Urabe, Shyouhei
5bab1304af fix visibility of SecureRandom.gen_random
Aliasing a method preserves its visibility.  These aliases turn
formerly-public methods into private.  Should make them public
again.  [Bug #15847]
2019-05-14 11:44:20 +09:00
aycabta
af1f3f131f Readline's class vars should be encoded as default_external 2019-05-14 07:15:41 +09:00
aycabta
741321704f Remove unused variable in LineEditor 2019-05-14 07:12:59 +09:00
Étienne Barrié
2dc613815d
delegate.rb: don't look for methods on Kernel
Instead, look for instance methods of Kernel.
Otherwise, instance methods of Module (which are methods of Kernel
itself) are mistakenly believed to exist, and it fails when calling
Kernel.instance_method().

Closes: https://github.com/ruby/ruby/pull/1422
2019-05-13 11:29:42 +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
ebb15cc6c1 Reline.completion_proc= should raise ArgumentError
When the value is not Proc.
2019-05-13 02:33:29 +09:00
aycabta
130ced9fb0 Reline.completion_append_character= should be nil
When unknown value comes.
2019-05-13 02:31:42 +09:00