From 75e2e15662d91f07cd5c86971fff32081a40f3eb Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 8 Jul 2022 19:19:28 +0900 Subject: [PATCH] `no_hint` configuration option It doesn't show any hint on the REPL. fix #538 --- README.md | 1 + lib/debug/config.rb | 1 + lib/debug/console.rb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83c3fa90f..bac5bfdd6 100644 --- a/README.md +++ b/README.md @@ -474,6 +474,7 @@ config set no_color true * `RUBY_DEBUG_NO_COLOR` (`no_color`): Do not use colorize (default: false) * `RUBY_DEBUG_NO_SIGINT_HOOK` (`no_sigint_hook`): Do not suspend on SIGINT (default: false) * `RUBY_DEBUG_NO_RELINE` (`no_reline`): Do not use Reline library (default: false) + * `RUBY_DEBUG_NO_HINT` (`no_hint`): Do not show the hint on the REPL (default: false) * CONTROL * `RUBY_DEBUG_SKIP_PATH` (`skip_path`): Skip showing/entering frames for given paths diff --git a/lib/debug/config.rb b/lib/debug/config.rb index 7e86576ec..ecace8538 100644 --- a/lib/debug/config.rb +++ b/lib/debug/config.rb @@ -19,6 +19,7 @@ module DEBUGGER__ no_color: ['RUBY_DEBUG_NO_COLOR', "UI: Do not use colorize", :bool, "false"], no_sigint_hook: ['RUBY_DEBUG_NO_SIGINT_HOOK', "UI: Do not suspend on SIGINT", :bool, "false"], no_reline: ['RUBY_DEBUG_NO_RELINE', "UI: Do not use Reline library", :bool, "false"], + no_hint: ['RUBY_DEBUG_NO_HINT', "UI: Do not show the hint on the REPL", :bool, "false"], # control setting skip_path: ['RUBY_DEBUG_SKIP_PATH', "CONTROL: Skip showing/entering frames for given paths", :path], diff --git a/lib/debug/console.rb b/lib/debug/console.rb index e3d5b5afa..2da261662 100644 --- a/lib/debug/console.rb +++ b/lib/debug/console.rb @@ -98,7 +98,7 @@ def readline_setup prompt when :ruby colorize_code(buff.chomp) end - end + end unless CONFIG[:no_hint] yield