diff options
author | psakievich <psakiev@sandia.gov> | 2024-01-10 16:57:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 16:57:45 -0700 |
commit | 12963529af3243cd7cf8d470dd2eef142b71278b (patch) | |
tree | 619be3c4b9f30bccf5c63ec60091f1fec527c3d9 /share | |
parent | ec758bfd5ba23313afd45797a14b3e5871b33bba (diff) | |
download | spack-12963529af3243cd7cf8d470dd2eef142b71278b.tar.gz spack-12963529af3243cd7cf8d470dd2eef142b71278b.tar.bz2 spack-12963529af3243cd7cf8d470dd2eef142b71278b.tar.xz spack-12963529af3243cd7cf8d470dd2eef142b71278b.zip |
Add `--create` to `spack env activate` (#40896)
Add `--create` option to `env activate` to allow users to create and activate in one command.
---------
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: psakievich <psakievich@users.noreply.github.com>
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/spack-completion.bash | 2 | ||||
-rwxr-xr-x | share/spack/spack-completion.fish | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 1cad9c3da9..0c002aafc3 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1030,7 +1030,7 @@ _spack_env() { _spack_env_activate() { if $list_options then - SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --with-view -v --without-view -V -p --prompt --temp -d --dir" + SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --with-view -v --without-view -V -p --prompt --temp --create --envfile --keep-relative -d --dir" else _environments fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 2cd66977d1..1f597badb4 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1467,7 +1467,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 create envfile= keep-relative 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' @@ -1489,8 +1489,14 @@ complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -f 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 complete -c spack -n '__fish_spack_using_command env activate' -l temp -d 'create and activate an environment in a temporary directory' -complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -f -a dir -complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -r -d 'activate the environment in this directory' +complete -c spack -n '__fish_spack_using_command env activate' -l create -f -a create +complete -c spack -n '__fish_spack_using_command env activate' -l create -d 'create and activate the environment if it doesn\'t exist' +complete -c spack -n '__fish_spack_using_command env activate' -l envfile -r -f -a envfile +complete -c spack -n '__fish_spack_using_command env activate' -l envfile -r -d 'either a lockfile (must end with \'.json\' or \'.lock\') or a manifest file' +complete -c spack -n '__fish_spack_using_command env activate' -l keep-relative -f -a keep_relative +complete -c spack -n '__fish_spack_using_command env activate' -l keep-relative -d 'copy relative develop paths verbatim into the new environment when initializing from envfile' +complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -f -a dir +complete -c spack -n '__fish_spack_using_command env activate' -s d -l dir -d 'activate environment based on the directory supplied' # spack env deactivate set -g __fish_spack_optspecs_spack_env_deactivate h/help sh csh fish bat pwsh |