spack external find: allow to search by tags (#21407)

This commit adds an option to the `external find`
command that allows it to search by tags. In this
way group of executables with common purposes can
be grouped under a single name and a simple command
can be used to detect all of them.

As an example introduce the 'build-tools' tag to
search for common development tools on a system
This commit is contained in:
Massimiliano Culpo
2021-02-04 13:17:32 +01:00
committed by GitHub
parent e9ae44fd8c
commit 694d633a2c
15 changed files with 76 additions and 12 deletions

View File

@@ -882,7 +882,7 @@ _spack_external() {
_spack_external_find() {
if $list_options
then
SPACK_COMPREPLY="-h --help --not-buildable --scope"
SPACK_COMPREPLY="-h --help --not-buildable --scope -t --tag"
else
_all_packages
fi
@@ -904,7 +904,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 --tags -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 --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
@@ -1063,7 +1063,7 @@ _spack_license_update_copyright_year() {
_spack_list() {
if $list_options
then
SPACK_COMPREPLY="-h --help -d --search-description --format --update -v --virtuals -t --tags"
SPACK_COMPREPLY="-h --help -d --search-description --format --update -v --virtuals -t --tag"
else
_all_packages
fi