fixed csh init script to deal with funny shell chars like * and {}

This commit is contained in:
lakata
2002-04-24 01:15:46 +00:00
parent 1f0e7cfae1
commit 1659c7277f

View File

@@ -9,23 +9,36 @@ else
setenv MODULE_VERSION "@VERSION@"
setenv MODULE_VERSION_STACK "@VERSION@"
endif
set exec_prefix='@BASEPREFIX@$MODULE_VERSION'
set exec_prefix='@BASEPREFIX@'
set prefix=""
set postfix=""
if ( $?histchars ) then
set histchar = `echo $histchars | cut -c1`
set _histchars = $histchars
if ($?prompt) then
alias module 'unset histchars;set _prompt="$prompt";eval `'$exec_prefix'/bin/modulecmd '$modules_shell' \!*`;set histchars = $_histchars; set prompt="$_prompt";unset _prompt'
else
alias module 'unset histchars;eval `'$exec_prefix'/bin/modulecmd '$modules_shell' \!*`;set histchars = $_histchars'
endif
set prefix = 'unset histchars;'
set postfix = 'set histchars = $_histchars;'
else
if ($?prompt) then
alias module 'set _prompt="$prompt";set prompt="";eval `'$exec_prefix'/bin/modulecmd '$modules_shell' \!*`;set prompt="$_prompt";unset _prompt'
else
alias module 'eval `'$exec_prefix'/bin/modulecmd '$modules_shell' \!*`'
endif
set histchar = \!
endif
if ($?prompt) then
set prefix = "$prefix"'set _prompt="$prompt";set prompt="";'
set postfix = "$postfix"'set prompt="$_prompt";unset _prompt;'
endif
if ($?noglob) then
set prefix = "$prefix""set noglob;"
set postfix = "$postfix""unset noglob;"
endif
alias module $prefix'eval `'$exec_prefix'/bin/modulecmd '$modules_shell' '$histchar'*`; '$postfix
unset exec_prefix
unset prefix
unset postfix
setenv MODULESHOME @prefix@