diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2018-12-24 13:42:15 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-12-30 00:19:08 -0800 |
commit | d763e921418dab339e45406c6083b3540695abd6 (patch) | |
tree | a1eb963c92bd6850616934d4a817f6c5d5ae6aab /share | |
parent | d2db978c7ff02fc3aef06f4459df320a216328f2 (diff) | |
download | spack-d763e921418dab339e45406c6083b3540695abd6.tar.gz spack-d763e921418dab339e45406c6083b3540695abd6.tar.bz2 spack-d763e921418dab339e45406c6083b3540695abd6.tar.xz spack-d763e921418dab339e45406c6083b3540695abd6.zip |
commands: add `spack resource` command to inspect downloadable files
- currently just looks at patches
- allows you to find out which package applied a patch to a spec
- intended to work with tarballs and resources in the future.
- add tab completion for `spack resource` and subcommands
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 "^--" } |