diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/spack-completion.bash | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 288746863c..012d2403eb 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1041,6 +1041,28 @@ function _spack_repo_rm { _spack_repo_remove } +function _spack_resource { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "list show" -- "$cur" + fi +} + +function _spack_resource_list { + compgen -W "-h --help --only-hashes" -- "$cur" +} + +function _spack_resource_show { + if $list_options + then + compgen -W "-h --help" -- "$cur" + else + compgen -W "$(_all_resource_hashes)" -- "$cur" + fi +} + function _spack_restage { if $list_options then @@ -1244,6 +1266,10 @@ function _all_packages { spack list } +function _all_resource_hashes { + spack resource list --only-hashes +} + function _installed_packages { spack --color=never find | grep -v "^--" } |