[Lldb-commits] [PATCH] D142067: Remove the "help" subcommand - its undocumented, undiscoverable and doesn't work....

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 19 11:43:04 PST 2023


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



More information about the lldb-commits mailing list