-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Improve the Spack command reference #7214
Conversation
- previously commands with this argument showed a long list of choices that were platform specific. - use a better metavar: {defaults,system,site,user}[/PLATFORM]
- Add proper help for `spack buildcache` subcommands - Reorganize the help categories of Spack commands so that buildcache is in packaging and diy and setup are now in build.
- Shorten Spack command usage for short options. Short options are now shown as [-abc] instead of as [-a] [-b] [-c] - fix bug that mixed long and short options for top-level `spack help`
a75299b
to
5119d90
Compare
- command reference now includes usage for all Spack commands as output by `spack help`. Each command usage links to any related section in the docs. - added `spack commands` command which can list command names, subcommands, and generate RST docs for commands. - added `llnl.util.argparsewriter`, which analyzes an argparse parser and calls hooks for description, usage, options, and subcommands
5119d90
to
363c32a
Compare
This is cool. Is it possible to add short and long descriptions to argparse commands? What I'm envisioning is that when you run |
@adamjstewart: it's possible in the sense that we could add a long help attribute to commands, but we'd need to rework the help formatter to do it. We already have a custom help formatter in Then again, I think other tools tend to deal with this differently. Thoughts? |
This improves the command reference in the docs. Previously, the command reference listed only commands for which we explicitly wrote documentation. Now it lists all Spack commands and shows their usage. This was sort of inspired by the Docker CLI reference.
This also contains a number of improvements to
spack <cmd> -h
output.spack commands
command to list commands in various formats (including RST)spack commands
to generate the command reference. Docs now have an index by type of command and show full usage.spack buildcache
subcommandsspack -h
argument display[-abc]
, not[-a] [-b] [-c]
--scope
arguments in configuration commands likemirror
,repo
, etc. (it's now much shorter)You can look at a preview here.
@JusticeForMikeBrown: you might like this, as it would've saved you a few issue submissions.