spack/share/spack
Tamara Dahlgren 1b0631b69e
Env help: expand and refine subcommand help and descriptions (#47089)
This PR is in response to a question in the `environments` slack channel (https://spackpm.slack.com/archives/CMHK7MF51/p1729200068557219) about inadequate CLI help/documentation for one specific subcommand.

This PR uses the approach I took for the descriptions and help for `spack test` subcommands.  Namely, I use the first line of the relevant docstring as the description, which is shown per subcommand in `spack env -h`, and the entire docstring as the help.  I then added, where it seemed appropriate, help.  I also tweaked argument docstrings to tighten them up, make consistent with similar arguments elsewhere in the command, and elaborate when it seemed important.  (The only subcommand I didn't touch is `loads`.)

For example, before:
```
$ spack env update -h
usage: spack env update [-hy] env

positional arguments:
  env               name or directory of the environment to activate

optional arguments:
  -h, --help        show this help message and exit
  -y, --yes-to-all  assume "yes" is the answer to every confirmation request
```

After the changes in this PR:
```
$ spack env update -h
usage: spack env update [-hy] env

update the environment manifest to the latest schema format

    update the environment to the latest schema format, which may not be
    readable by older versions of spack

    a backup copy of the manifest is retained in case there is a need to revert
    this operation
    

positional arguments:
  env               name or directory of the environment

optional arguments:
  -h, --help        show this help message and exit
  -y, --yes-to-all  assume "yes" is the answer to every confirmation request
```

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-10-24 13:55:00 -07:00
..
bash Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
bootstrap bootstrap: add clingo 3.13 binaries and more (#47126) 2024-10-24 08:55:14 +02:00
csh Fix setup-env when going back and forth between instances (#40924) 2024-01-05 11:31:32 -06:00
docker Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
docs/docker/module-file-tutorial Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
fish Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
gitlab/cloud_pipelines ci: Remove deprecated logic from the ci module (#47062) 2024-10-23 12:50:55 -06:00
keys update tutorial command for v0.18.0 and new gpg key (#30904) 2022-05-28 02:36:20 +00:00
logo add artisanal handcrafted SVG Spack logo. (#6165) 2017-11-06 22:42:16 -08:00
qa run-unit-tests: no xdist if coverage (#46480) 2024-09-19 14:01:33 +02:00
templates env depfile: generate Makefile with absolute script path (#46966) 2024-10-15 13:52:31 +00:00
setup-env.csh fix 'command -v' not in csh (#45845) 2024-10-02 19:15:35 +02:00
setup-env.fish Remove execution permission from setup-env.sh (#45641) 2024-08-09 13:27:07 -07:00
setup-env.ps1 Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
setup-env.sh Remove execution permission from setup-env.sh (#45641) 2024-08-09 13:27:07 -07:00
setup-tutorial-env.sh Remove execution permission from setup-env.sh (#45641) 2024-08-09 13:27:07 -07:00
spack-completion.bash Env help: expand and refine subcommand help and descriptions (#47089) 2024-10-24 13:55:00 -07:00
spack-completion.fish Env help: expand and refine subcommand help and descriptions (#47089) 2024-10-24 13:55:00 -07:00