From 0f6dc1289b596f4e9331bdd4bdc3f4ffe87321f0 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 15 Jan 2018 13:59:14 +0100 Subject: [PATCH 1/3] Add quit, exit and help --- lib/cli/consolecommand.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index 9225fd6d2..735be4b67 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -132,7 +132,8 @@ void ConsoleCommand::BreakpointHandler(ScriptFrame& frame, ScriptError *ex, cons ShowCodeLocation(std::cout, di); std::cout << "You can inspect expressions (such as variables) by entering them at the prompt.\n" - << "To leave the debugger and continue the program use \"$continue\".\n"; + << "To leave the debugger and continue the program use \"$continue\".\n" + << "For further commands see \"$help\".\n"; #ifdef HAVE_EDITLINE rl_completion_entry_function = ConsoleCommand::ConsoleCompleteHelper; @@ -237,7 +238,9 @@ int ConsoleCommand::Run(const po::variables_map& vm, const std::vector Date: Mon, 15 Jan 2018 14:40:31 +0100 Subject: [PATCH 2/3] Update consolecommand.cpp Rename to debug console in help --- lib/cli/consolecommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index 735be4b67..ade7ae43c 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -388,7 +388,7 @@ incomplete: if (line == "$continue" || line == "$quit" || line == "$exit") break; else if (line == "$help") - std::cout << "Welcome to the Icinga 2 console/script debugger.\n" + std::cout << "Welcome to the Icinga 2 debug console.\n" "Usable commands:\n" " $continue, $quit, $exit Quit the console\n" " $help Print this help\n\n" From e6412bf7410f50117b81ee2fdc643c3797e7e0e8 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 15 Jan 2018 15:31:53 +0100 Subject: [PATCH 3/3] Improve console help text Split continue and quit/exit commands --- lib/cli/consolecommand.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index ade7ae43c..bbee81727 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -390,8 +390,9 @@ incomplete: else if (line == "$help") std::cout << "Welcome to the Icinga 2 debug console.\n" "Usable commands:\n" - " $continue, $quit, $exit Quit the console\n" - " $help Print this help\n\n" + " $continue Continue running Icinga 2 (script debugger).\n" + " $quit, $exit Stop debugging and quit the console.\n" + " $help Print this help.\n\n" "For more information on how to use this console, please consult the documentation at https://icinga.com/docs\n"; else std::cout << "Unknown debugger command: " << line << "\n";