diff options
-rw-r--r-- | lib/spack/spack/cmd/find.py | 8 | ||||
-rwxr-xr-x | share/spack/spack-completion.bash | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index f7bd56db19..15ea5c7709 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -31,6 +31,14 @@ def setup_parser(subparser): help="output specs with the specified format string", ) format_group.add_argument( + "-H", + "--hashes", + action="store_const", + dest="format", + const="{/hash}", + help="same as '--format {/hash}'; use with xargs or $()", + ) + format_group.add_argument( "--json", action="store_true", default=False, diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 2e98698e0f..959e4924f2 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1075,7 +1075,7 @@ _spack_fetch() { _spack_find() { if $list_options then - SPACK_COMPREPLY="-h --help --format --json -d --deps -p --paths --groups --no-groups -l --long -L --very-long -t --tag -c --show-concretized -f --show-flags --show-full-compiler -x --explicit -X --implicit -u --unknown -m --missing -v --variants --loaded -M --only-missing --deprecated --only-deprecated -N --namespace --start-date --end-date" + SPACK_COMPREPLY="-h --help --format -H --hashes --json -d --deps -p --paths --groups --no-groups -l --long -L --very-long -t --tag -c --show-concretized -f --show-flags --show-full-compiler -x --explicit -X --implicit -u --unknown -m --missing -v --variants --loaded -M --only-missing --deprecated --only-deprecated -N --namespace --start-date --end-date" else _installed_packages fi |