jingham added a comment.

I wouldn't be opposed to adding a --help option (with no short option) that 
every command would inherit.  Doing it as a command option alone can't suffice 
for lldb, since that offers no way to list all the commands.  git gets around 
this because you can say `git` on the command line to get all the available 
commands.  If we're doing the command help through an option, there isn't a 
really natural way to do "show me all commands".  For pedantic consistency, you 
could have:

(lldb) --help

do that, but that's pretty gross.  Or in analogy to git you could have

(lldb) lldb

do the job, but that's not particularly discoverable either.

Otherwise you really have to have a `help` command and once you have that it's 
a little weird to use `help` to get the list of commands but then not to get 
help on individual commands.  So --help as an option becomes a little 
redundant.  OTOH, you could do some fun stuff with it like:

(lldb) break set --help

would give help on break set, but

(lldb) break set --help -f

would just show the help string for the -f option...  So as an add-on I don't 
mind that, and being an option would keep if from messing with the parsing of 
everything.  Using the bare word `help` more widely is bound to cause 
collisions...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142067/new/

https://reviews.llvm.org/D142067

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to