Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: make help more helpful #4942

Open
joyously opened this issue Nov 21, 2024 · 1 comment
Open

FR: make help more helpful #4942

joyously opened this issue Nov 21, 2024 · 1 comment

Comments

@joyously
Copy link

Is your feature request related to a problem? Please describe.
It feels frustrating when even the help command gives an error.

$ jj help annotate
error: unrecognized subcommand 'annotate'

Usage: jj [OPTIONS] <COMMAND>

For more information, try '--help'.

Right now, we have opaque, minimal descriptions such as

bookmark          Manage bookmarks
config            Manage config options
file              File operations
git               Commands for working with Git remotes and the underlying Git repo
operation         Commands for working with the operation log
tag               Manage tags
util              Infrequently used commands such as for generating shell completions
workspace         Commands for working with workspaces

There is also duplication of jj version and jj -V. When I tried what I thought should work, I got an error:

$ jj help -V
error: unexpected argument '-V' found

  tip: to pass '-V' as a value, use '-- -V'

Usage: jj help [OPTIONS] [COMMAND]...

For more information, try '--help'.

Describe the solution you'd like
Instead of suggesting --help on the help command, it should fall back to -h summary, to output some actual help. Or look one level deeper, to find the subcommand.

The commands with subcommands should list the subcommands in the general help.

bookmark          Manage bookmarks - create, delete, forget, list, move, rename, set, track, untrack
config            Manage config options - edit, get, list, path, set, unset
file              File operations - annotate, chmod, list, show, track, untrack
git               Manage Git remotes and underlying Git repo - clone, export, fetch, import, init, push, remote
operation        Manage operation log - abandon, diff, log, restore, show, undo
tag               Manage tags - list
util              Utility commands - completion, config-schema, gc, mangen, markdown-help
workspace        Manage workspaces - add, forget, list, rename, root, update-stale

I think that the help should always print the version, but if not, it should handle the -V flag, or the -V should be a global option. (Global options don't work with help either though...)

Additional context
Using jj 0.23.0

@ilyagr
Copy link
Contributor

ilyagr commented Nov 21, 2024

The "For more information, try '--help'" seems especially unhelpful, since it doesn't help to add --help.

I'm tempted to add a "help wanted" label, to indicate that we're looking for helpers who can help make our help more helpful, but I will resist doing it for the sole reason of wordplay.

Or maybe it should be a "help help help" label. Help help help our users!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants