mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[ruby/irb] Add command line option to select which completor to use
(https://github.com/ruby/irb/pull/754)
* Add command line option to select which completor to use
* Add test for completor argv
1dec2708c9
This commit is contained in:
parent
ae1fad4cd7
commit
c4efd17061
5 changed files with 33 additions and 0 deletions
|
@ -330,6 +330,10 @@ module IRB # :nodoc:
|
|||
@CONF[:USE_AUTOCOMPLETE] = true
|
||||
when "--noautocomplete"
|
||||
@CONF[:USE_AUTOCOMPLETE] = false
|
||||
when "--regexp-completor"
|
||||
@CONF[:COMPLETOR] = :regexp
|
||||
when "--type-completor"
|
||||
@CONF[:COMPLETOR] = :type
|
||||
when /^--prompt-mode(?:=(.+))?/, /^--prompt(?:=(.+))?/
|
||||
opt = $1 || argv.shift
|
||||
prompt_mode = opt.upcase.tr("-", "_").intern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue