summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2022-09-01 11:04:01 -0700
committerGitHub <noreply@github.com>2022-09-01 11:04:01 -0700
commit2968ae667f62f859f42d08897b0bca273265158d (patch)
tree060fca33ac8b43572d5172e89bd6d05513bee8cd /share
parent92b72f186e3e7e53e133f41c783739cb26bc7e7c (diff)
downloadspack-2968ae667f62f859f42d08897b0bca273265158d.tar.gz
spack-2968ae667f62f859f42d08897b0bca273265158d.tar.bz2
spack-2968ae667f62f859f42d08897b0bca273265158d.tar.xz
spack-2968ae667f62f859f42d08897b0bca273265158d.zip
New command, `spack change`, to change existing env specs (#31995)
If you have an environment like ``` $ cat spack.yaml spack: specs: [openmpi@4.1.0+cuda] ``` this PR provides a new command `spack change` that you can use to adjust environment specs from the command line: ``` $ spack change openmpi~cuda $ cat spack.yaml spack: specs: [openmpi@4.1.0~cuda] ``` in other words, this allows you to tweak the details of environment specs from the command line. Notes: * This is only allowed for environments that do not define matrices * This is possible but not anticipated to be needed immediately * If this were done, it should probably only be done for "named"/not-anonymous specs (i.e. we can change `openmpi+cuda` but not spec like `+cuda` or `@4.0.1~cuda`)
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash11
1 files changed, 10 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 4cfde14e7a..58e94c036a 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -337,7 +337,7 @@ _spack() {
then
SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace -V --version --print-shell-vars"
else
- SPACK_COMPREPLY="activate add arch audit blame bootstrap build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
+ SPACK_COMPREPLY="activate add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view"
fi
}
@@ -585,6 +585,15 @@ _spack_cd() {
fi
}
+_spack_change() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -l --list-name --match-spec -a --all"
+ else
+ _all_packages
+ fi
+}
+
_spack_checksum() {
if $list_options
then