diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index 2652e2c2364101..cfad15b781e129 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -27,12 +27,17 @@ #include #include -constexpr char kInteractiveModePrompt[] = "Stop and restart stack: [Ctrl+_] & [Ctrl+^]\n" - "Trigger exit(0): [Ctrl+@]\n" - "Quit Interactive: 'quit()'\n" - ">>> "; +constexpr char kInteractiveModeInstruction[] = "╔══════════════════════════════════════════════════════════════════╗\n" + "║ Interactive Mode ║\n" + "╠══════════════════════════════════════════════════════════════════╣\n" + "║ Stop and restart stack: [Ctrl+_] & [Ctrl+^ ] ║\n" + "║ Trigger exit(0) : [Ctrl+@] ║\n" + "║ Quit Interactive : 'quit()' or `quit` ║\n" + "╚══════════════════════════════════════════════════════════════════╝\n"; +constexpr char kInteractiveModePrompt[] = ">>> "; constexpr char kInteractiveModeHistoryFilePath[] = "/tmp/darwin_framework_tool_history"; constexpr char kInteractiveModeStopCommand[] = "quit()"; +constexpr char kInteractiveModeStopAlternateCommand[] = "quit"; constexpr char kCategoryError[] = "Error"; constexpr char kCategoryProgress[] = "Info"; constexpr char kCategoryDetail[] = "Debug"; @@ -277,6 +282,11 @@ void ENFORCE_FORMAT(3, 0) InteractiveServerLoggingCallback(const char * module, printf("%s\n", mAdditionalPrompt.Value()); ClearLine(); } + + ClearLine(); + printf("%s", kInteractiveModeInstruction); + ClearLine(); + command = readline(kInteractiveModePrompt); // Do not save empty lines @@ -391,7 +401,7 @@ el_status_t ExitFunction() bool InteractiveCommand::ParseCommand(char * command, int * status) { - if (strcmp(command, kInteractiveModeStopCommand) == 0) { + if (strcmp(command, kInteractiveModeStopCommand) == 0 || strcmp(command, kInteractiveModeStopAlternateCommand) == 0) { ExecuteDeferredCleanups(); return NO; }