summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash11
-rwxr-xr-xshare/spack/spack-completion.fish9
2 files changed, 19 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 0c002aafc3..abc6db10d1 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -824,7 +824,7 @@ _spack_config() {
then
SPACK_COMPREPLY="-h --help --scope"
else
- SPACK_COMPREPLY="get blame edit list add prefer-upstream remove rm update revert"
+ SPACK_COMPREPLY="get blame edit list add change prefer-upstream remove rm update revert"
fi
}
@@ -868,6 +868,15 @@ _spack_config_add() {
fi
}
+_spack_config_change() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help --match-spec"
+ else
+ SPACK_COMPREPLY=""
+ fi
+}
+
_spack_config_prefer_upstream() {
SPACK_COMPREPLY="-h --help --local"
}
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish
index 1f597badb4..10c92bc6f1 100755
--- a/share/spack/spack-completion.fish
+++ b/share/spack/spack-completion.fish
@@ -1165,6 +1165,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a blame -d 'p
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a edit -d 'edit configuration file'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a list -d 'list configuration sections'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a add -d 'add configuration parameters'
+complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a change -d 'swap variants etc. on specs in config'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a prefer-upstream -d 'set package preferences from upstream'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a remove -d 'remove configuration parameters'
complete -c spack -n '__fish_spack_using_command_pos 0 config' -f -a rm -d 'remove configuration parameters'
@@ -1208,6 +1209,14 @@ complete -c spack -n '__fish_spack_using_command config add' -s h -l help -d 'sh
complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -f -a file
complete -c spack -n '__fish_spack_using_command config add' -s f -l file -r -d 'file from which to set all config values'
+# spack config change
+set -g __fish_spack_optspecs_spack_config_change h/help match-spec=
+complete -c spack -n '__fish_spack_using_command_pos 0 config change' -f -a '(__fish_spack_colon_path)'
+complete -c spack -n '__fish_spack_using_command config change' -s h -l help -f -a help
+complete -c spack -n '__fish_spack_using_command config change' -s h -l help -d 'show this help message and exit'
+complete -c spack -n '__fish_spack_using_command config change' -l match-spec -r -f -a match_spec
+complete -c spack -n '__fish_spack_using_command config change' -l match-spec -r -d 'only change constraints that match this'
+
# spack config prefer-upstream
set -g __fish_spack_optspecs_spack_config_prefer_upstream h/help local
complete -c spack -n '__fish_spack_using_command config prefer-upstream' -s h -l help -f -a help