diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/spack-completion.bash | 7 | ||||
-rw-r--r-- | share/spack/spack-completion.fish | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 7546c6ade6..0cadf7b12d 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1195,7 +1195,12 @@ _spack_find() { } _spack_gc() { - SPACK_COMPREPLY="-h --help -E --except-any-environment -e --except-environment -b --keep-build-dependencies -y --yes-to-all" + if $list_options + then + SPACK_COMPREPLY="-h --help -E --except-any-environment -e --except-environment -b --keep-build-dependencies -y --yes-to-all" + else + _installed_packages + fi } _spack_gpg() { diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 43616c2fae..172af7e8f3 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1817,6 +1817,7 @@ complete -c spack -n '__fish_spack_using_command find' -l end-date -r -d 'latest # spack gc set -g __fish_spack_optspecs_spack_gc h/help E/except-any-environment e/except-environment= b/keep-build-dependencies y/yes-to-all +complete -c spack -n '__fish_spack_using_command_pos_remainder 0 gc' -f -a '(__fish_spack_installed_specs)' complete -c spack -n '__fish_spack_using_command gc' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command gc' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command gc' -s E -l except-any-environment -f -a except_any_environment |