Issue 143666
Summary clang-repl lacks documentation on the supported % commands and a way to discover them from within clang-repl
Labels
Assignees
Reporter DavidSpickett
    clang-repl has some special cased commands like `%quit`, `%undo`, but they are not as easy to discover as they could be.

`%quit` is documented here https://clang.llvm.org/docs/ClangRepl.html#closure-or-termination but there's no way to know it exists if you are just inside `clang-repl`. Though if you've read one example file, you probably know it exists.

`%undo` is not mentioned on that page at all. It's only in clang-repl's source code and test cases.

It would be great if:
* The documentation mentioned `%undo` and what it does (which is a great feature, so it deserves to be highlighted anyway!)
* There was some other command that would list all valid `%` commands while in clang-repl. For instance `%help`. (maybe more effort than you want to put in for 2 commands, but it would help the first time user experience)
* clang-repl printed some opening line like "type %help to list commands".
* `clang-repl --help` would include some blurb about usage, currently it jumps right into options that seem like they come from clang:
```
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build>.\bin\clang-repl --help
USAGE: clang-repl [options] [code to run]

OPTIONS:
```
* `%some-invalid-command` would print an error stating what I could have used. This one might not be possible as perhaps there is some scenario where `%something` might be part of code?

Perhaps I am treating clang-repl as a user facing thing rather than a library to be wrapped up in something else. In which case this is all understandable.

Also some of this might be a good first issue? If a maintainer thinks so please add that label.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to