diff options
author | aycabta <[email protected]> | 2021-08-30 02:08:16 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2021-08-30 02:45:13 +0900 |
commit | ece4ed0da715218168e264aa7067113d48d38a3d (patch) | |
tree | a383f9ed44f04681ad0992efdcef2da8ef2b4227 /lib/irb/init.rb | |
parent | b6b2b767ed50cb29d7abb96ab9dcee552cc0470a (diff) |
Add --autocomplete / --noautocomplete options
Diffstat (limited to 'lib/irb/init.rb')
-rw-r--r-- | lib/irb/init.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 5923c54a29..3c27b4ffff 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -45,6 +45,7 @@ module IRB # :nodoc: @CONF[:USE_SINGLELINE] = false unless defined?(ReadlineInputMethod) @CONF[:USE_COLORIZE] = !ENV['NO_COLOR'] + @CONF[:USE_AUTOCOMPLETE] = true @CONF[:INSPECT_MODE] = true @CONF[:USE_TRACER] = false @CONF[:USE_LOADER] = false @@ -274,6 +275,10 @@ module IRB # :nodoc: @CONF[:USE_COLORIZE] = true when "--nocolorize" @CONF[:USE_COLORIZE] = false + when "--autocomplete" + @CONF[:USE_AUTOCOMPLETE] = true + when "--noautocomplete" + @CONF[:USE_AUTOCOMPLETE] = false when /^--prompt-mode(?:=(.+))?/, /^--prompt(?:=(.+))?/ opt = $1 || argv.shift prompt_mode = opt.upcase.tr("-", "_").intern |