diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2023-10-17 15:40:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 15:40:48 +0200 |
commit | bd165ebc4dbd0001d4e125e1caeb9fe09064c632 (patch) | |
tree | 15f114d530689e960e0a44c4164ce89ec66854c4 /share/spack/spack-completion.fish | |
parent | 348e5cb522eb6041f8556ed5823fb63aa23305c7 (diff) | |
download | spack-bd165ebc4dbd0001d4e125e1caeb9fe09064c632.tar.gz spack-bd165ebc4dbd0001d4e125e1caeb9fe09064c632.tar.bz2 spack-bd165ebc4dbd0001d4e125e1caeb9fe09064c632.tar.xz spack-bd165ebc4dbd0001d4e125e1caeb9fe09064c632.zip |
Support `spack env activate --with-view <name> <env>` (#40549)
Currently `spack env activate --with-view` exists, but is a no-op.
So, it is not too much of a breaking change to make this redundant flag
accept a value `spack env activate --with-view <name>` which activates
a particular view by name.
The view name is stored in `SPACK_ENV_VIEW`.
This also fixes an issue where deactivating a view that was activated
with `--without-view` possibly removes entries from PATH, since now we
keep track of whether the default view was "enabled" or not.
Diffstat (limited to 'share/spack/spack-completion.fish')
-rwxr-xr-x | share/spack/spack-completion.fish | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index f4ac310ada..e37b3448d5 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1427,7 +1427,7 @@ complete -c spack -n '__fish_spack_using_command env' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command env' -s h -l help -d 'show this help message and exit' # spack env activate -set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view V/without-view p/prompt temp d/dir= +set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view= V/without-view p/prompt temp d/dir= complete -c spack -n '__fish_spack_using_command_pos 0 env activate' -f -a '(__fish_spack_environments)' complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -d 'show this help message and exit' @@ -1441,10 +1441,10 @@ complete -c spack -n '__fish_spack_using_command env activate' -l bat -f -a shel complete -c spack -n '__fish_spack_using_command env activate' -l bat -d 'print bat commands to activate the environment' complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -f -a shell complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -d 'print powershell commands to activate environment' -complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -f -a with_view -complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -d 'update PATH, etc., with associated view' -complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -f -a with_view -complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -d 'do not update PATH, etc., with associated view' +complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -f -a with_view +complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -d 'set runtime environment variables for specific view' +complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -f -a without_view +complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -d 'do not set runtime environment variables for any view' complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -f -a prompt complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -d 'decorate the command line prompt when activating' complete -c spack -n '__fish_spack_using_command env activate' -l temp -f -a temp |