summaryrefslogtreecommitdiff
path: root/share/spack/csh/spack.csh
diff options
context:
space:
mode:
Diffstat (limited to 'share/spack/csh/spack.csh')
-rw-r--r--share/spack/csh/spack.csh4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh
index 6690f08eed..a773dd216b 100644
--- a/share/spack/csh/spack.csh
+++ b/share/spack/csh/spack.csh
@@ -77,8 +77,8 @@ case env:
set _sp_env_arg=""
[ $#_sp_args -gt 1 ] && set _sp_env_arg = ($_sp_args[2])
- if ( "$_sp_env_arg" == "" || "$_sp_env_arg" =~ "-*" ) then
- # no args or does not start with -: just execute
+ if ( "$_sp_env_arg" == "" || "$_sp_args" =~ "*--sh*" || "$_sp_args" =~ "*--csh*" || "$_sp_args" =~ "*-h*" ) then
+ # no args or args contain -h/--help, --sh, or --csh: just execute
\spack $_sp_flags env $_sp_args
else
shift _sp_args # consume 'activate' or 'deactivate'