Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
69e5683b
Commit
69e5683b
authored
5 years ago
by
Adam J. Stewart
Committed by
Todd Gamblin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix outdated bash tab completion (#14392)
parent
5397d500
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/spack/spack-completion.bash
+319
-198
319 additions, 198 deletions
share/spack/spack-completion.bash
with
319 additions
and
198 deletions
share/spack/spack-completion.bash
+
319
−
198
View file @
69e5683b
...
@@ -34,6 +34,7 @@ function _bash_completion_spack {
...
@@ -34,6 +34,7 @@ function _bash_completion_spack {
# For example, `spack -d install []` will call _spack_install
# For example, `spack -d install []` will call _spack_install
# and `spack compiler add []` will call _spack_compiler_add
# and `spack compiler add []` will call _spack_compiler_add
local
subfunction
=
$(
IFS
=
'_'
;
echo
"_
${
COMP_WORDS_NO_FLAGS
[*]
}
"
)
local
subfunction
=
$(
IFS
=
'_'
;
echo
"_
${
COMP_WORDS_NO_FLAGS
[*]
}
"
)
# Translate dashes to underscores, as dashes are not permitted in
# Translate dashes to underscores, as dashes are not permitted in
# compatibility mode. See https://github.com/spack/spack/pull/4079
# compatibility mode. See https://github.com/spack/spack/pull/4079
subfunction
=
${
subfunction
//-/_
}
subfunction
=
${
subfunction
//-/_
}
...
@@ -96,11 +97,11 @@ function _spack {
...
@@ -96,11 +97,11 @@ function _spack {
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -H --all-help --color -C --config-scope
compgen
-W
"-h --help -H --all-help --color -C --config-scope
-d --debug --pdb -e --env -D --env-dir
-E --no-env
-d --debug
--timestamp
--pdb -e --env -D --env-dir
--use-env-repo -k --insecure
-l --enable-locks
-E --no-env
--use-env-repo -k --insecure
-L --disable-locks -m --mock
-p --profile
-l --enable-locks
-L --disable-locks -m --mock
--sorted-profile --lines -v --verbose
--stacktrace
-p --profile
--sorted-profile --lines -v --verbose
-V --version --print-shell-vars"
--
"
$cur
"
--stacktrace
-V --version --print-shell-vars"
--
"
$cur
"
else
else
compgen
-W
"
$(
_subcommands
)
"
--
"
$cur
"
compgen
-W
"
$(
_subcommands
)
"
--
"
$cur
"
fi
fi
...
@@ -118,15 +119,16 @@ function _spack_activate {
...
@@ -118,15 +119,16 @@ function _spack_activate {
function
_spack_add
{
function
_spack_add
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help
-l --list-name
"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_arch
{
function
_spack_arch
{
compgen
-W
"-h --help -p --platform -o --operating-system
compgen
-W
"-h --help --known-targets -p --platform
-t --target --known-targets"
--
"
$cur
"
-o --operating-system -t --target -f --frontend
-b --backend"
--
"
$cur
"
}
}
function
_spack_blame
{
function
_spack_blame
{
...
@@ -141,7 +143,7 @@ function _spack_blame {
...
@@ -141,7 +143,7 @@ function _spack_blame {
function
_spack_bootstrap
{
function
_spack_bootstrap
{
compgen
-W
"-h --help -j --jobs --keep-prefix --keep-stage
compgen
-W
"-h --help -j --jobs --keep-prefix --keep-stage
-n --no-checksum -v --verbose --use-cache --no-cache
-n --no-checksum -v --verbose --use-cache --no-cache
--clean --dirty"
--
"
$cur
"
--cache-only
--clean --dirty"
--
"
$cur
"
}
}
function
_spack_build
{
function
_spack_build
{
...
@@ -156,7 +158,7 @@ function _spack_build {
...
@@ -156,7 +158,7 @@ function _spack_build {
function
_spack_build_env
{
function
_spack_build_env
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --clean --dirty"
--
"
$cur
"
compgen
-W
"-h --help --clean --dirty
--dump --pickle
"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -167,15 +169,17 @@ function _spack_buildcache {
...
@@ -167,15 +169,17 @@ function _spack_buildcache {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"create install keys list"
--
"
$cur
"
compgen
-W
"create install list keys preview check download
get-buildcache-name save-yaml copy update-index"
--
"
$cur
"
fi
fi
}
}
function
_spack_buildcache_create
{
function
_spack_buildcache_create
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -r --rel -f --force -u --unsigned -a --allow-root
compgen
-W
"-h --help -r --rel -f --force -u --unsigned
-k --key -d --directory"
--
"
$cur
"
-a --allow-root -k --key -d --directory
--no-rebuild-index -y --spec-yaml --no-deps"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -184,8 +188,18 @@ function _spack_buildcache_create {
...
@@ -184,8 +188,18 @@ function _spack_buildcache_create {
function
_spack_buildcache_install
{
function
_spack_buildcache_install
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -f --force -m --multiple -a --allow-root -u
compgen
-W
"-h --help -f --force -m --multiple -a --allow-root
--unsigned"
--
"
$cur
"
-u --unsigned"
--
"
$cur
"
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
}
function
_spack_buildcache_list
{
if
$list_options
then
compgen
-W
"-h --help -l --long -L --very-long -v --variants
-f --force"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -195,15 +209,42 @@ function _spack_buildcache_keys {
...
@@ -195,15 +209,42 @@ function _spack_buildcache_keys {
compgen
-W
"-h --help -i --install -t --trust -f --force"
--
"
$cur
"
compgen
-W
"-h --help -i --install -t --trust -f --force"
--
"
$cur
"
}
}
function
_spack_buildcache_
list
{
function
_spack_buildcache_
preview
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
-f --force
"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_
inst
all
ed
_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_buildcache_check
{
compgen
-W
"-h --help -m --mirror-url -o --output-file --scope
-s --spec -y --spec-yaml --rebuild-on-error"
--
"
$cur
"
}
function
_spack_buildcache_download
{
compgen
-W
"-h --help -s --spec -y --spec-yaml -p --path
-c --require-cdashid"
--
"
$cur
"
}
function
_spack_buildcache_get_buildcache_name
{
compgen
-W
"-h --help -s --spec -y --spec-yaml"
--
"
$cur
"
}
function
_spack_buildcache_save_yaml
{
compgen
-W
"-h --help --root-spec --root-spec-yaml -s --specs
-y --yaml-dir"
--
"
$cur
"
}
function
_spack_buildcache_copy
{
compgen
-W
"-h --help --base-dir --spec-yaml --destination-url"
--
"
$cur
"
}
function
_spack_buildcache_update_index
{
compgen
-W
"-h --help -d --mirror-url"
--
"
$cur
"
}
function
_spack_cd
{
function
_spack_cd
{
if
$list_options
if
$list_options
then
then
...
@@ -257,47 +298,48 @@ function _spack_compiler {
...
@@ -257,47 +298,48 @@ function _spack_compiler {
fi
fi
}
}
function
_spack_compiler_
ad
d
{
function
_spack_compiler_
fin
d
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
compgen
-W
"-h --help --scope"
--
"
$cur
"
fi
fi
}
}
function
_spack_compiler_
fin
d
{
function
_spack_compiler_
ad
d
{
# Alias to `spack compiler
ad
d`
# Alias to `spack compiler
fin
d`
_spack_compiler_
ad
d
_spack_compiler_
fin
d
}
}
function
_spack_compiler_
info
{
function
_spack_compiler_
remove
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
compgen
-W
"-h --help
-a --all
--scope"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_compilers
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_compilers
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_compiler_rm
{
# Alias to `spack compiler remove`
_spack_compiler_remove
}
function
_spack_compiler_list
{
function
_spack_compiler_list
{
compgen
-W
"-h --help --scope"
--
"
$cur
"
compgen
-W
"-h --help --scope"
--
"
$cur
"
}
}
function
_spack_compiler_
remove
{
function
_spack_compiler_
info
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
-a --all
--scope"
--
"
$cur
"
compgen
-W
"-h --help --scope"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_compilers
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_compilers
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_compiler_rm
{
# Alias to `spack compiler remove`
_spack_compiler_remove
}
function
_spack_compilers
{
function
_spack_compilers
{
compgen
-W
"-h --help --scope"
--
"
$cur
"
# Alias to `spack compiler list`
_spack_compiler_list
}
}
function
_spack_concretize
{
function
_spack_concretize
{
...
@@ -309,34 +351,37 @@ function _spack_config {
...
@@ -309,34 +351,37 @@ function _spack_config {
then
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
compgen
-W
"-h --help --scope"
--
"
$cur
"
else
else
compgen
-W
"blame edit
get
"
--
"
$cur
"
compgen
-W
"
get
blame edit"
--
"
$cur
"
fi
fi
}
}
function
_spack_config_
blame
{
function
_spack_config_
get
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"mirrors repos modules packages config compilers"
--
"
$cur
"
compgen
-W
"compilers mirrors repos packages modules config
upstreams"
--
"
$cur
"
fi
fi
}
}
function
_spack_config_
edit
{
function
_spack_config_
blame
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
--print-file
"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"mirrors repos modules packages config compilers"
--
"
$cur
"
compgen
-W
"compilers mirrors repos packages modules config
upstreams"
--
"
$cur
"
fi
fi
}
}
function
_spack_config_
g
et
{
function
_spack_config_e
di
t
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help
--print-file
"
--
"
$cur
"
else
else
compgen
-W
"mirrors repos modules packages config compilers"
--
"
$cur
"
compgen
-W
"compilers mirrors repos packages modules config
upstreams"
--
"
$cur
"
fi
fi
}
}
...
@@ -382,8 +427,8 @@ function _spack_debug_create_db_tarball {
...
@@ -382,8 +427,8 @@ function _spack_debug_create_db_tarball {
function
_spack_dependencies
{
function
_spack_dependencies
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -i --installed -t --transitive
-V
compgen
-W
"-h --help -i --installed -t --transitive
--no-expand-virtuals"
--
"
$cur
"
--deptype -V
--no-expand-virtuals"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -398,13 +443,36 @@ function _spack_dependents {
...
@@ -398,13 +443,36 @@ function _spack_dependents {
fi
fi
}
}
function
_spack_deprecate
{
if
$list_options
then
compgen
-W
"-h --help -y --yes-to-all -d --dependencies
-D --no-dependencies -i --install-deprecator
-I --no-install-deprecator -l --link-type"
--
"
$cur
"
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
}
function
_spack_dev_build
{
if
$list_options
then
compgen
-W
"-h --help -j --jobs -d --source-path
-i --ignore-dependencies -n --no-checksum
--keep-prefix --skip-patch -q --quiet -u --until
--clean --dirty"
--
"
$cur
"
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
}
function
_spack_diy
{
function
_spack_diy
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -j --jobs -d --source-path
compgen
-W
"-h --help -j --jobs -d --source-path
-i --ignore-dependencies -n --no-checksum
-i --ignore-dependencies -n --no-checksum
--keep-prefix --skip-patch -q --quiet -
-clean
--keep-prefix --skip-patch -q --quiet -
u --until
--
dirty -u --until
"
--
"
$cur
"
--
clean --dirty
"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -417,8 +485,8 @@ function _spack_docs {
...
@@ -417,8 +485,8 @@ function _spack_docs {
function
_spack_edit
{
function
_spack_edit
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -b --build-system -c --command -d --docs
-t
compgen
-W
"-h --help -b --build-system -c --command -d --docs
--test -m --module -r --repo -N --namespace"
--
"
$cur
"
-t
--test -m --module -r --repo -N --namespace"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -429,29 +497,44 @@ function _spack_env {
...
@@ -429,29 +497,44 @@ function _spack_env {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"activate
create
deactivate list l
s load
s
compgen
-W
"activate deactivate
create remove rm
list ls
remove rm status st
"
--
"
$cur
"
status st loads view
"
--
"
$cur
"
fi
fi
}
}
function
_spack_env_activate
{
function
_spack_env_activate
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --sh --csh -d --dir -p --prompt"
--
"
$cur
"
compgen
-W
"-h --help --sh --csh -v --with-view
-V --without-view -d --dir -p --prompt"
--
"
$cur
"
else
else
compgen
-W
"
$(
_environments
)
"
--
"
$cur
"
compgen
-W
"
$(
_environments
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_env_deactivate
{
compgen
-W
"-h --help --sh --csh"
--
"
$cur
"
}
function
_spack_env_create
{
function
_spack_env_create
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -d --dir"
--
"
$cur
"
compgen
-W
"-h --help -d --dir
--without-view --with-view
"
--
"
$cur
"
fi
fi
}
}
function
_spack_env_deactivate
{
function
_spack_env_remove
{
compgen
-W
"-h --help --sh --csh"
--
"
$cur
"
if
$list_options
then
compgen
-W
"-h --help -y --yes-to-all"
--
"
$cur
"
else
compgen
-W
"
$(
_environments
)
"
--
"
$cur
"
fi
}
function
_spack_env_rm
{
# Alias to `spack env remove`
_spack_env_remove
}
}
function
_spack_env_list
{
function
_spack_env_list
{
...
@@ -463,6 +546,15 @@ function _spack_env_ls {
...
@@ -463,6 +546,15 @@ function _spack_env_ls {
_spack_env_list
_spack_env_list
}
}
function
_spack_env_status
{
compgen
-W
"-h --help"
--
"
$cur
"
}
function
_spack_env_st
{
# Alias to `spack env status`
_spack_env_status
}
function
_spack_env_loads
{
function
_spack_env_loads
{
if
$list_options
if
$list_options
then
then
...
@@ -473,38 +565,24 @@ function _spack_env_loads {
...
@@ -473,38 +565,24 @@ function _spack_env_loads {
fi
fi
}
}
function
_spack_env_
remove
{
function
_spack_env_
view
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
-y --yes-to-all
"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
_environments
)
"
--
"
$cur
"
compgen
-W
"
regenerate enable disable
"
--
"
$cur
"
fi
fi
}
}
function
_spack_env_rm
{
# Alias to `spack env remove`
_spack_env_remove
}
function
_spack_env_status
{
compgen
-W
"-h --help"
--
"
$cur
"
}
function
_spack_env_st
{
# Alias to `spack env status`
_spack_env_status
}
function
_spack_extensions
{
function
_spack_extensions
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -l --long -
p
--
paths
-d --deps
compgen
-W
"-h --help -l --long -
L
--
very-long
-d --deps
-s --show -v --view"
--
"
$cur
"
-p --paths
-s --show -v --view"
--
"
$cur
"
else
else
compgen
-W
"aspell go-bootstrap go icedtea j
ava jdk
lua
compgen
-W
"aspell go-bootstrap go icedtea j
dk kim-api
lua
matlab mofem-cephas octave perl python r
ruby
matlab mofem-cephas octave
openjdk
perl python r
rust tcl yorick"
--
"
$cur
"
ruby
rust tcl yorick"
--
"
$cur
"
fi
fi
}
}
...
@@ -521,13 +599,13 @@ function _spack_fetch {
...
@@ -521,13 +599,13 @@ function _spack_fetch {
function
_spack_find
{
function
_spack_find
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -
s --short
-d --deps -p --paths
compgen
-W
"-h --help -
-format --json
-d --deps -p --paths
--format --json
--groups --no-groups -l --long
--groups --no-groups -l --long
-L --very-long
-L --very-long
-t --tags -c --show-concretized
-t --tags -c --show-concretized
-f --show-flags
-f --show-flags
--show-full-compiler -x --explicit
--show-full-compiler -x --explicit
-X --implicit
-X --implicit
-u --unknown -m --missing -v --variants
-u --unknown -m --missing -v --variants
-M --only-missing -
N --namespace --start-d
ate
-M --only-missing -
-deprecated --only-deprec
ate
d
--end-date"
--
"
$cur
"
-N --namespace --start-date
--end-date"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -546,30 +624,34 @@ function _spack_gpg {
...
@@ -546,30 +624,34 @@ function _spack_gpg {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"create export init list sign trust untrust verify"
--
"
$cur
"
compgen
-W
"verify trust untrust sign create list init
export"
--
"
$cur
"
fi
fi
}
}
function
_spack_gpg_
create
{
function
_spack_gpg_
verify
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --comment --expires --export"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
compgen
-W
"
$(
installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_gpg_
expor
t
{
function
_spack_gpg_
trus
t
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
fi
fi
}
}
function
_spack_gpg_init
{
function
_spack_gpg_untrust
{
compgen
-W
"-h --help"
--
"
$cur
"
if
$list_options
}
then
compgen
-W
"-h --help --signing"
--
"
$cur
"
function
_spack_gpg_list
{
else
compgen
-W
"-h --help --trusted --signing"
--
"
$cur
"
compgen
-W
"
$(
_keys
)
"
--
"
$cur
"
fi
}
}
function
_spack_gpg_sign
{
function
_spack_gpg_sign
{
...
@@ -581,34 +663,35 @@ function _spack_gpg_sign {
...
@@ -581,34 +663,35 @@ function _spack_gpg_sign {
fi
fi
}
}
function
_spack_gpg_
trust
{
function
_spack_gpg_
create
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help
--comment --expires --export
"
--
"
$cur
"
fi
fi
}
}
function
_spack_gpg_untrust
{
function
_spack_gpg_list
{
if
$list_options
compgen
-W
"-h --help --trusted --signing"
--
"
$cur
"
then
compgen
-W
"-h --help --signing"
--
"
$cur
"
fi
}
}
function
_spack_gpg_verify
{
function
_spack_gpg_init
{
compgen
-W
"-h --help"
--
"
$cur
"
}
function
_spack_gpg_export
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
installed_package
s
)
"
--
"
$cur
"
compgen
-W
"
$(
_key
s
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_graph
{
function
_spack_graph
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -a --ascii -d --dot
-n --normalize
-s --static
compgen
-W
"-h --help -a --ascii -d --dot -s --static
-i --installed
-t
--deptype"
--
"
$cur
"
-i --installed --deptype"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -635,12 +718,14 @@ function _spack_info {
...
@@ -635,12 +718,14 @@ function _spack_info {
function
_spack_install
{
function
_spack_install
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --only -
j --jobs -I --install-status
compgen
-W
"-h --help --only -
u --until -j --jobs --overwrite
--overwrite
--keep-prefix --keep-stage --dont-restage
--keep-prefix --keep-stage --dont-restage
--use-cache
--
use
-cache --
no-
cache --show-log-on-error --source
--
no
-cache --cache
-only
--show-log-on-error --source
-n --no-checksum -v --verbose --fake --only-concrete
-n --no-checksum -v --verbose --fake --only-concrete
-f --file --clean --dirty --test --log-format --log-file
-f --file --clean --dirty --test --run-tests
--cdash-upload-url -y --yes-to-all"
--
"
$cur
"
--log-format --log-file -y --yes-to-all
--cdash-upload-url --cdash-build --cdash-site
--cdash-track --cdash-buildstamp"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -704,7 +789,7 @@ function _spack_log_parse {
...
@@ -704,7 +789,7 @@ function _spack_log_parse {
function
_spack_maintainers
{
function
_spack_maintainers
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
-a --all
--maintained --unmaintained
compgen
-W
"-h --help --maintained --unmaintained
-a --all
--by-user"
--
"
$cur
"
--by-user"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
...
@@ -716,29 +801,25 @@ function _spack_mirror {
...
@@ -716,29 +801,25 @@ function _spack_mirror {
then
then
compgen
-W
"-h --help -n --no-checksum"
--
"
$cur
"
compgen
-W
"-h --help -n --no-checksum"
--
"
$cur
"
else
else
compgen
-W
"add create list remove rm"
--
"
$cur
"
compgen
-W
"create add remove rm set-url list"
--
"
$cur
"
fi
}
function
_spack_mirror_add
{
if
$list_options
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
fi
fi
}
}
function
_spack_mirror_create
{
function
_spack_mirror_create
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -d --directory -f --file
compgen
-W
"-h --help -d --directory
-a --all
-f --file
-D --dependencies -n --versions-per-spec"
--
"
$cur
"
-D --dependencies -n --versions-per-spec"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_mirror_list
{
function
_spack_mirror_add
{
compgen
-W
"-h --help --scope"
--
"
$cur
"
if
$list_options
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
fi
}
}
function
_spack_mirror_remove
{
function
_spack_mirror_remove
{
...
@@ -755,6 +836,19 @@ function _spack_mirror_rm {
...
@@ -755,6 +836,19 @@ function _spack_mirror_rm {
_spack_mirror_remove
_spack_mirror_remove
}
}
function
_spack_mirror_set_url
{
if
$list_options
then
compgen
-W
"-h --help --push --scope"
--
"
$cur
"
else
compgen
-W
"
$(
_mirrors
)
"
--
"
$cur
"
fi
}
function
_spack_mirror_list
{
compgen
-W
"-h --help --scope"
--
"
$cur
"
}
function
_spack_module
{
function
_spack_module
{
if
$list_options
if
$list_options
then
then
...
@@ -764,95 +858,92 @@ function _spack_module {
...
@@ -764,95 +858,92 @@ function _spack_module {
fi
fi
}
}
function
_spack_module_
tcl
{
function
_spack_module_
lmod
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"refresh find rm loads"
--
"
$cur
"
compgen
-W
"refresh find rm loads
setdefault
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_lmod_refresh
{
function
_spack_module_tcl_find
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --full-path -r --dependencies"
--
"
$cur
"
compgen
-W
"-h --help --delete-tree --upstream-modules
-y --yes-to-all"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
tcl_loads
{
function
_spack_module_
lmod_find
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --input-only -p --prefix -x --exclude
compgen
-W
"-h --help --full-path -r --dependencies"
--
"
$cur
"
-r --dependencies"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
tcl_refresh
{
function
_spack_module_
lmod_rm
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
--delete-tree
-y --yes-to-all"
--
"
$cur
"
compgen
-W
"-h --help -y --yes-to-all"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
tcl_rm
{
function
_spack_module_
lmod_loads
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -y --yes-to-all"
--
"
$cur
"
compgen
-W
"-h --help --input-only -p --prefix -x --exclude
-r --dependencies"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_lmod
{
function
_spack_module_lmod
_setdefault
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
refresh find rm loads setdefault
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_tcl
{
function
_spack_module_lmod_find
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help
--full-path -r --dependencies
"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
refresh find rm loads
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
lmod_loads
{
function
_spack_module_
tcl_refresh
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --
input-only -p --prefix -x --exclude
compgen
-W
"-h --help --
delete-tree --upstream-modules
-
r
--
dependencies
"
--
"
$cur
"
-
y
--
yes-to-all
"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
lmod_refresh
{
function
_spack_module_
tcl_find
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help --
delete-tree
-
y
--
yes-to-all
"
--
"
$cur
"
compgen
-W
"-h --help --
full-path
-
r
--
dependencies
"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_module_
lmod
_rm
{
function
_spack_module_
tcl
_rm
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -y --yes-to-all"
--
"
$cur
"
compgen
-W
"-h --help -y --yes-to-all"
--
"
$cur
"
...
@@ -861,10 +952,11 @@ function _spack_module_lmod_rm {
...
@@ -861,10 +952,11 @@ function _spack_module_lmod_rm {
fi
fi
}
}
function
_spack_module_
lmod_setdefault
{
function
_spack_module_
tcl_loads
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help --input-only -p --prefix -x --exclude
-r --dependencies"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -884,7 +976,7 @@ function _spack_pkg {
...
@@ -884,7 +976,7 @@ function _spack_pkg {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"add
added diff list
removed"
--
"
$cur
"
compgen
-W
"add
list diff added changed
removed"
--
"
$cur
"
fi
fi
}
}
...
@@ -897,7 +989,7 @@ function _spack_pkg_add {
...
@@ -897,7 +989,7 @@ function _spack_pkg_add {
fi
fi
}
}
function
_spack_pkg_
added
{
function
_spack_pkg_
list
{
# FIXME: How to list git revisions?
# FIXME: How to list git revisions?
if
$list_options
if
$list_options
then
then
...
@@ -913,7 +1005,7 @@ function _spack_pkg_diff {
...
@@ -913,7 +1005,7 @@ function _spack_pkg_diff {
fi
fi
}
}
function
_spack_pkg_
list
{
function
_spack_pkg_
added
{
# FIXME: How to list git revisions?
# FIXME: How to list git revisions?
if
$list_options
if
$list_options
then
then
...
@@ -921,6 +1013,14 @@ function _spack_pkg_list {
...
@@ -921,6 +1013,14 @@ function _spack_pkg_list {
fi
fi
}
}
function
_spack_pkg_changed
{
# FIXME: How to list git revisions?
if
$list_options
then
compgen
-W
"-h --help -t --type"
--
"
$cur
"
fi
}
function
_spack_pkg_removed
{
function
_spack_pkg_removed
{
# FIXME: How to list git revisions?
# FIXME: How to list git revisions?
if
$list_options
if
$list_options
...
@@ -956,10 +1056,15 @@ function _spack_reindex {
...
@@ -956,10 +1056,15 @@ function _spack_reindex {
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
}
}
function
_spack_release_jobs
{
compgen
-W
"-h --help -o --output-file -p --print-summary
--cdash-credentials"
--
"
$cur
"
}
function
_spack_remove
{
function
_spack_remove
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -a --all -f --force"
--
"
$cur
"
compgen
-W
"-h --help -a --all
-l --list-name
-f --force"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
...
@@ -970,14 +1075,7 @@ function _spack_repo {
...
@@ -970,14 +1075,7 @@ function _spack_repo {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"add create list remove rm"
--
"
$cur
"
compgen
-W
"create list add remove rm"
--
"
$cur
"
fi
}
function
_spack_repo_add
{
if
$list_options
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
fi
fi
}
}
...
@@ -992,6 +1090,13 @@ function _spack_repo_list {
...
@@ -992,6 +1090,13 @@ function _spack_repo_list {
compgen
-W
"-h --help --scope"
--
"
$cur
"
compgen
-W
"-h --help --scope"
--
"
$cur
"
}
}
function
_spack_repo_add
{
if
$list_options
then
compgen
-W
"-h --help --scope"
--
"
$cur
"
fi
}
function
_spack_repo_remove
{
function
_spack_repo_remove
{
if
$list_options
if
$list_options
then
then
...
@@ -1051,7 +1156,7 @@ function _spack_spec {
...
@@ -1051,7 +1156,7 @@ function _spack_spec {
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -l --long -L --very-long -I --install-status
compgen
-W
"-h --help -l --long -L --very-long -I --install-status
-
j --json -y --yaml
-c --cover -N --namespaces
-
y --yaml -j --json
-c --cover -N --namespaces
-t --types"
--
"
$cur
"
-t --types"
--
"
$cur
"
else
else
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
...
@@ -1092,34 +1197,37 @@ function _spack_unload {
...
@@ -1092,34 +1197,37 @@ function _spack_unload {
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
compgen
-W
"
$(
_installed_packages
)
"
--
"
$cur
"
fi
fi
}
}
function
_spack_u
nuse
{
function
_spack_u
pload_s3
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
$(
_installed_packages
)
"
compgen
-W
"
spec index"
--
"
$cur
"
fi
fi
}
}
function
_spack_upload_s3_spec
{
compgen
-W
"-h --help -s --spec -y --spec-yaml -b --base-dir
-e --endpoint-url"
--
"
$cur
"
}
function
_spack_upload_s3_index
{
compgen
-W
"-h --help -e --endpoint-url"
--
"
$cur
"
}
function
_spack_url
{
function
_spack_url
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
else
else
compgen
-W
"
list
parse st
ats
summary"
--
"
$cur
"
compgen
-W
"parse
li
st summary
stats
"
--
"
$cur
"
fi
fi
}
}
function
_spack_url_list
{
compgen
-W
"-h --help -c --color -e --extrapolation
-n --incorrect-name -N --correct-name
-v --incorrect-version -V --correct-version"
--
"
$cur
"
}
function
_spack_url_parse
{
function
_spack_url_parse
{
if
$list_options
if
$list_options
then
then
...
@@ -1127,20 +1235,27 @@ function _spack_url_parse {
...
@@ -1127,20 +1235,27 @@ function _spack_url_parse {
fi
fi
}
}
function
_spack_url_stats
{
function
_spack_url_list
{
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help -c --color -e --extrapolation
-n --incorrect-name -N --correct-name
-v --incorrect-version -V --correct-version"
--
"
$cur
"
}
}
function
_spack_url_summary
{
function
_spack_url_summary
{
compgen
-W
"-h --help"
--
"
$cur
"
compgen
-W
"-h --help"
--
"
$cur
"
}
}
function
_spack_use
{
function
_spack_url_stats
{
compgen
-W
"-h --help"
--
"
$cur
"
}
function
_spack_verify
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -r --dependencies"
--
"
$cur
"
compgen
-W
"-h --help -l --local -j --json -a --all -s --specs
-f --files"
--
"
$cur
"
else
else
compgen
-W
"
$(
_
inst
all
ed
_packages
)
"
--
"
$cur
"
compgen
-W
"
$(
_all_packages
)
"
--
"
$cur
"
fi
fi
}
}
...
@@ -1159,8 +1274,16 @@ function _spack_view {
...
@@ -1159,8 +1274,16 @@ function _spack_view {
compgen
-W
"-h --help -v --verbose -e --exclude
compgen
-W
"-h --help -v --verbose -e --exclude
-d --dependencies"
--
"
$cur
"
-d --dependencies"
--
"
$cur
"
else
else
compgen
-W
"add check hard hardlink remove rm soft
compgen
-W
"symlink add soft hardlink hard remove rm statlink
statlink status symlink"
--
"
$cur
"
status check"
--
"
$cur
"
fi
}
function
_spack_view_symlink
{
if
$list_options
then
compgen
-W
"-h --help --projection-file
-i --ignore-conflicts"
--
"
$cur
"
fi
fi
}
}
...
@@ -1169,23 +1292,24 @@ function _spack_view_add {
...
@@ -1169,23 +1292,24 @@ function _spack_view_add {
_spack_view_symlink
_spack_view_symlink
}
}
function
_spack_view_check
{
function
_spack_view_soft
{
# Alias for `spack view statlink`
# Alias for `spack view symlink`
_spack_view_statlink
_spack_view_symlink
}
function
_spack_view_hard
{
# Alias for `spack view hardlink`
_spack_view_hardlink
}
}
function
_spack_view_hardlink
{
function
_spack_view_hardlink
{
if
$list_options
if
$list_options
then
then
compgen
-W
"-h --help -i --ignore-conflicts"
--
"
$cur
"
compgen
-W
"-h --help --projection-file
-i --ignore-conflicts"
--
"
$cur
"
fi
fi
}
}
function
_spack_view_hard
{
# Alias for `spack view hardlink`
_spack_view_hardlink
}
function
_spack_view_remove
{
function
_spack_view_remove
{
if
$list_options
if
$list_options
then
then
...
@@ -1198,11 +1322,6 @@ function _spack_view_rm {
...
@@ -1198,11 +1322,6 @@ function _spack_view_rm {
_spack_view_remove
_spack_view_remove
}
}
function
_spack_view_soft
{
# Alias for `spack view symlink`
_spack_view_symlink
}
function
_spack_view_statlink
{
function
_spack_view_statlink
{
if
$list_options
if
$list_options
then
then
...
@@ -1215,11 +1334,9 @@ function _spack_view_status {
...
@@ -1215,11 +1334,9 @@ function _spack_view_status {
_spack_view_statlink
_spack_view_statlink
}
}
function
_spack_view_symlink
{
function
_spack_view_check
{
if
$list_options
# Alias for `spack view statlink`
then
_spack_view_statlink
compgen
-W
"-h --help -i --ignore-conflicts"
--
"
$cur
"
fi
}
}
# Helper functions for subcommands
# Helper functions for subcommands
...
@@ -1264,6 +1381,10 @@ function _environments {
...
@@ -1264,6 +1381,10 @@ function _environments {
spack
env
list
spack
env
list
}
}
function
_keys
{
spack gpg list
}
# Testing functions
# Testing functions
function
_test_vars
{
function
_test_vars
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment