summaryrefslogtreecommitdiff
path: root/lib/reline.rb
AgeCommit message (Collapse)Author
2021-03-24[ruby/reline] Add Reline.ungetc to control bufferaycabta
https://github.com/ruby/reline/commit/43ac03c624
2021-02-07[ruby/reline] Cache pasting state in processing a keyaycabta
Because it's too slow. The rendering time in IRB has been reduced as follows: start = Time.now def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") next if l == "\n" @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end break if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end puts "Duration: #{Time.now - start} seconds" 0.22sec -> 0.14sec https://github.com/ruby/reline/commit/b8b3dd52c0
2020-12-22[ruby/reline] [ruby/reline] Remove unused `attr_writer`ima1zumi
https://github.com/ruby/reline/commit/ecdc1b7116 https://github.com/ruby/reline/commit/a7922da16b
2020-12-22[ruby/reline] Fixed an exception occurred when ambiguous width character was ↵ima1zumi
passed to `#calculate_width` [Bug #17405] https://github.com/ruby/reline/commit/f79b4c857f
2020-12-17[ruby/reline] Make a log file on windows if debug env is setaycabta
https://github.com/ruby/reline/commit/dff30a2d44
2020-12-05[ruby/reline] Support bracketed paste modeaycabta
https://github.com/ruby/reline/commit/d1a6869322
2020-12-05[ruby/reline] Suppress callbacks in pastingaycabta
IRB uses Reline's 3 dynamic real-time callbacks with calling Ripper; output_modifier_proc, prompt_proc, and auto_indent_proc. These processing times make the paste time too long. https://github.com/ruby/reline/commit/beec3399a8
2020-08-18[ruby/reline] Add require 'rbconfig' to use RbConfigaycabta
https://github.com/ruby/reline/commit/4a0d32a3d0
2020-08-18[ruby/reline] Support mode iconMark Delk
Co-authored-by: aycabta <aycabta@gmail.com> https://github.com/ruby/reline/commit/067b618123
2020-08-18[ruby/reline] Check Errno::EIOaycabta
Catch Errno::EIO what will be occurred if the console terminates I/O before Reline finishes rendering. https://github.com/ruby/reline/commit/e51eaa6d43
2020-05-14Reline callbacks can take nilaycabta
2020-03-26[ruby/reline] Suppress error when check ambiguous char width in LANG=Caycabta
https://github.com/ruby/reline/commit/623dffdd75
2020-03-26[ruby/reline] Work with wrong $/ value correctlyaycabta
https://github.com/ruby/reline/commit/962ebf5a1b
2020-02-14[ruby/reline] Use IO#write instead of IO#printaycabta
IO#print always adds a string of $\ automatically. https://github.com/ruby/reline/commit/a93119c847
2020-01-26Always refer to Reline::IOGate.encodingaycabta
2020-01-21Reline: Use a more robust detection of MinTTYLars Kanis
The previous detection per get_screen_size fails when stdout is passed to a pipe. That is the case when running ruby tests in parallel ("-j" switch). In this case Reline believes that it's running on MinTTY and the tests are running with ANSI IOGate instead of the Windows adapter on MINGW. So parallel test results were different to that of a single process. This commit fixes these differencies. The code is taken from git sources and translated to ruby. NtQueryObject() is replaced by GetFileInformationByHandleEx(), because NtQueryObject() is undocumented and is more difficult to use: https://github.com/git-for-windows/git/blob/c5a03b1e29c69f3f06c8fabd92493edb73469176/compat/winansi.c#L558 Notes: Merged: https://github.com/ruby/ruby/pull/2848
2020-01-14Introduce an abstracted structure about the encoding of Relineaycabta
The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline.
2019-12-17[ruby/reline] Implement completion_append_characterThomas Leitner
There is already the possibility to set Reline.completion_append_character. However, it is not used by the line editor. https://github.com/ruby/reline/commit/ab798931b9
2019-12-11Support Readline.completion_quote_character by Relineaycabta
2019-12-10Support completion with case-insensitive fashionaycabta
Reline performs completion in a case-insensitive fashon if Readline.completion_case_fold or completion-ignore-case of .inputrc are set "on".
2019-12-03Support incremental search by last determined wordaycabta
In the incremental search by C-r, search word is saved when it's determined. In the next incremental search by C-r, if a user presses C-r again with the empty search word, the determined previous search word is used to search.
2019-11-21Change argument `Proc` to `#call` defined object.manga_osyo
This is the same as the behavior of Readline.
2019-11-20Mintty on Cygwin isn't a kind of command prompt, can process ANSI escape codeaycabta
2019-11-12Reline#readline and Reline#readmultiline to private.osyo-manga
2019-11-08Suppress "shadowing outer local variable" warning in 2.5aycabta
2019-11-05Only taint on Ruby <2.7Jeremy Evans
Ruby 2.7 deprecates taint and it no longer has an effect.
2019-10-31Fix verbose warning being emittedJeremy Evans
Fixes Ruby Bug 16281.
2019-09-09Reline: Fix wrong variable nameLars Kanis
This raised a NameError before. Notes: Merged: https://github.com/ruby/ruby/pull/2438
2019-08-27Remove duplicated delegationaycabta
2019-08-27Delegete an instance method to a class method correctlyaycabta
2019-08-27Save value to @ambiguous_width because of a accessoraycabta
2019-08-27The "private" doesn't make sence for class methods and a constantaycabta
2019-08-27Use preposing "private" to define methodsaycabta
2019-08-27Adjust method forwardings of Relineaycabta
2019-08-27Remove .freeze.manga_osyo
2019-08-27Fix `Reline::Windows`.manga_osyo
2019-08-27Refactoring Reline.manga_osyo
2019-08-27Remove test_mode in `lib/reline`.manga_osyo
2019-08-06Use host_os from RbConfig to detect host OS.Charles Oliver Nutter
RUBY_PLATFORM on JRuby is always "java", so it will not reflect the host operating system. This regex appears to be the consensus way to detect Windows based on a search of Ruby code on Github: https://github.com/search?q=%2Fmswin%7Cmsys%7Cmingw%7Ccygwin%7Cbccwin%7Cwince%7Cemc%2F&type=Code
2019-07-15Add `class Reline::History` and test.manga_osyo
2019-07-11Add arg check to Reline.dig_perfect_match_proc=aycabta
2019-06-18Print starting debug message with RELINE_STDERR_TTYaycabta
2019-06-18Implement auto indent for multilineaycabta
2019-06-14Remove debug printaycabta
2019-06-14Add Reline.prompt_procaycabta
2019-06-05Move I/O access from Reline::KeyStroke to Relineaycabta
2019-06-02Add Reline test for unknown macroaycabta
2019-06-02Add new test for Reline within pipeaycabta
2019-06-02Reline.readmultiline always needs block to confirm terminationaycabta
2019-06-01Use inputrc data for keystroke settingaycabta