From ece4ed0da715218168e264aa7067113d48d38a3d Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 30 Aug 2021 02:08:16 +0900 Subject: Add --autocomplete / --noautocomplete options --- lib/irb/init.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/irb/init.rb') 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 -- cgit v1.2.3