Bugfix for spack cd -h
This commit is contained in:
parent
a8ed1ec414
commit
70475d08c0
@ -46,8 +46,17 @@ set _sp_spec=""
|
||||
set _sp_modtype = ""
|
||||
switch ($_sp_subcommand)
|
||||
case cd:
|
||||
shift _sp_args # get rid of 'cd'
|
||||
|
||||
set _sp_arg=""
|
||||
[ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1])
|
||||
shift _sp_args
|
||||
cd `spack location $_sp_args`
|
||||
|
||||
if ( "$_sp_arg" == "-h" ) then
|
||||
\spack cd -h
|
||||
else
|
||||
cd `\spack location $_sp_arg $_sp_args`
|
||||
endif
|
||||
breaksw
|
||||
case use:
|
||||
case unuse:
|
||||
|
@ -76,7 +76,12 @@ function spack {
|
||||
# command.
|
||||
case $_sp_subcommand in
|
||||
"cd")
|
||||
cd $(spack location "$@")
|
||||
_sp_arg="$1"; shift
|
||||
if [ "$_sp_arg" = "-h" ]; then
|
||||
command spack cd -h
|
||||
else
|
||||
cd $(spack location $_sp_arg "$@")
|
||||
fi
|
||||
return
|
||||
;;
|
||||
"use"|"unuse"|"load"|"unload")
|
||||
|
Loading…
Reference in New Issue
Block a user