aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/input-method.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use IRB.conf[:AUTO_INDENT] setting in multiline modeaycabta2019-06-191-1/+1
|
* Implement auto indent for multilineaycabta2019-06-181-0/+5
|
* Use Reline.prompt_proc in IRBaycabta2019-06-141-0/+5
|
* Warn compile_error only when input is finishedTakashi Kokubun2019-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | Let's say we are in progress to write `"foo"`: ``` irb> "fo ``` at this moment, nothing is wrong. It would be just a normal way to write `"foo"`. Prior to this commit, the `fo` part was warned because of 5b64d7ac6e7cbf759b859428f125539e58bac0bd. But I think warning such a normal input is not valuable for users. However, we'd like to warn `:@1` or `@@1` which is also a syntax error. Then this commit switches the syntax highlight based on whether the input text is finished or not. When it's not finished yet, it does not warn compile_error.
* Use IRB::InputMethod#eof? to quitaycabta2019-05-271-1/+1
|
* Add and use Reline::Unicode.escape_for_printTakashi Kokubun2019-05-251-5/+10
|
* Respect --nocolorize on REPL source highlightTakashi Kokubun2019-05-251-3/+5
|
* Incremental syntax highlight for IRB source linesTakashi Kokubun2019-05-241-0/+4
| | | | Closes: https://github.com/ruby/ruby/pull/2202
* Show documents when completionaycabta2019-05-251-0/+1
|
* Use Reline as Reidline multiline editor in IRBaycabta2019-05-251-0/+84
|
* Revert "IRB is improved with Reline and RDoc, take 2"Nobuyoshi Nakada2019-04-231-85/+0
| | | | | Accidentally merged when 89271d4a3733bc5e70e9c56b4bd12f277e699c42 "Adjusted indents".
* IRB is improved with Reline and RDoc, take 2aycabta2019-04-231-0/+85
|
* Revert "IRB is improved with Reline and RDoc"aycabta2019-04-211-5/+1
| | | | | | This reverts commit 7f273ac6d0f05208b5b228da95205e20c0e8286c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* IRB is improved with Reline and RDocaycabta2019-04-201-1/+5
| | | | | | | | 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
* lib/*: Prefer require_relative over require, remove explicit extensionmarcandre2018-11-021-1/+1
| | | | | | [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/*: Prefer require_relative over require.marcandre2018-11-021-1/+1
| | | | | | [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/e2mmap.rb: remove needless instance variables.hsbt2014-08-241-1/+0
| | | | | | | | * lib/irb.rb: ditto. * lib/irb/**/*.rb: ditto. * lib/shell.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb.rb: removed commented-out code.hsbt2014-08-091-1/+0
| | | | | | * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cmath.rb: fixed indent.hsbt2014-08-091-17/+17
| | | | | | | * lib/drb/ssl.rb: ditto. * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/input-method.rb, lib/irb.rb: Typo in zzak2012-12-211-3/+3
| | | | | | | | InputMethod#readable_atfer_eof? to #readable_after_eof? [ruby-core:51069] [Bug #7599] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb.rb, lib/irb/*: Documentation for IRBzzak2012-12-211-7/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bin/irb, lib/irb.rb lib/irb/*: irb-0.9.6, extend inspect-modekeiju2009-07-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/input-method.rb: IRB did not prompt for MSwin32.yugui2009-01-131-2/+2
| | | | | | | [ruby-dev:37686]. Patch by arton <artonx AT yahoo.co.jp>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/input-method.rb (IRB::StdioInputMethod#initialize):yugui2008-12-261-1/+0
| | | | | | | removed a 'p' for debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/init.rb (IRB.opt_parse): (M17N) adds -U and -E as commandyugui2008-12-181-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | line options. [ruby-dev:37161]. Fixes #711. improved long optinos. * lib/irb/init.rb (IRB.set_encoding): new subroutine for IRB.opt_parse * lib/irb/input-method.rb (IRB::StdioInputMethod): (M17N) regards scripts that user types as encoded in the external_encoding. * lib/irb/input-method.rb (IRB::ReadlineInputMethod): ditto. * lib/irb/input-method.rb (IRB::FileInputMethod): (M17N) respects magic comment. * lib/irb/help.rb (IRB.print_usage): (M17N) respects magic comment in the resource file. * lib/irb/lc/help-message: adds -U and -E. * lib/irb/lc/ja/help-message: ditto. re-encoded from ISO-2022-JP into UTF-8. * lib/irb/lc/ja/encoding_aliases.rb: new file. provides Japanese specific character encoding name table for backward compatibility. * lib/irb/lc/ja/error.rb: re-eoncoded from ISO-2022-JP into UTF-8. magic comment. * lib/irb/locale.rb: integrated with Ruby 1.9's M17N support. * lib/irb/magic-file.rb: new file. utility to handle files with magic comment and opens in the correct encoding. * lib/irb/ruby-lex.rb (RubyLex#each_top_level_statement): recovers character encoding for a statement after it lexed so that irb can eval the statement in correct encoding. * lib/irb/src_encoding.rb: new file. utility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/readline/readline.c (readline_readline): do not set rl_{in,out}stream.shugo2005-06-171-0/+2
| | | | | | | | | * ext/readline/readline.c (readline_s_set_input): new method. * ext/readline/readline.c (readline_s_set_output): new method. * lib/irb/input-method.rb: set Readline.input and Readline.output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/readline/readline.c: supported libedit. fixed: [ruby-core:4858]shugo2005-05-191-2/+2
| | | | | | | | | | | | * ext/readline/extconf.rb: added new option --enable-libedit. * test/readline/test_readline.rb: added assertions for Readline::HISTORY. * lib/irb/input-method.rb: do not use Readline::HISTORY.pop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bin/irb lib/irb.rb lib/irb/...: IRB 0.9.5.keiju2005-04-131-40/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/init.rb (IRB.rc_files): yield possible rc file names.nobu2004-02-071-0/+37
| | | | | | | | * lib/irb/input-method.rb (IRB::ReadlineInputMethod::initialize): load and save history automatically. [ruby-core:02352] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update NotImplementError to NotImplementedError.matz2003-03-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * irb 0.9keiju2002-07-091-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge from irb 0.7.3.knu2001-04-301-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-05-12matz2000-05-121-0/+118
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e