File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -347,7 +347,11 @@ int main(int argc, const char **argv) {
347347 }
348348 }
349349
350+ const char *percent_commands = " %help\t list clang-repl %commands\n "
351+ " %undo\t undo the previous input\n "
352+ " %quit\t exit clang-repl\n " ;
350353 if (OptInputs.empty ()) {
354+ printf (" %%help for list of clang-repl commands\n " );
351355 llvm::LineEditor LE (" clang-repl" );
352356 std::string Input;
353357 LE.setListCompleter (ReplListCompleter (CB, *Interp));
@@ -371,7 +375,7 @@ int main(int argc, const char **argv) {
371375 if (auto Err = Interp->Undo ())
372376 llvm::logAllUnhandledErrors (std::move (Err), llvm::errs (), " error: " );
373377 } else if (Input == R"( %help)" ) {
374- printf (" clang-repl commands: { %%undo, %%quit } \n " );
378+ printf (" %s \n " , percent_commands );
375379 } else if (Input.rfind (" %lib " , 0 ) == 0 ) {
376380 if (auto Err = Interp->LoadDynamicLibrary (Input.data () + 5 ))
377381 llvm::logAllUnhandledErrors (std::move (Err), llvm::errs (), " error: " );
You can’t perform that action at this time.
0 commit comments