diff options
author | rsc <devnull@localhost> | 2005-08-10 16:59:19 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-08-10 16:59:19 +0000 |
commit | 3f056d8ef2b5eec8cc0401a0e9420977d5b248ea (patch) | |
tree | 472d2cb1cc6dbf950da6b4a2ebba3186f9b588fc | |
parent | 915a8b77ff4d314b03ec24680a868d09aa5b7c18 (diff) | |
download | plan9port-3f056d8ef2b5eec8cc0401a0e9420977d5b248ea.tar.gz plan9port-3f056d8ef2b5eec8cc0401a0e9420977d5b248ea.tar.bz2 plan9port-3f056d8ef2b5eec8cc0401a0e9420977d5b248ea.zip |
Make fn cd safe for rc -e.
-rw-r--r-- | rcmain | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -24,9 +24,16 @@ if(! ~ $#cflag 0){ } if(flag i){ if(~ $TERM 9term){ - if(~ $#'fn#cd' 0) - fn cd { builtin cd $1 && flag i && awd } - awd + fn cd { + # builtin cd $1 && flag i && awd + # is not sufficient when running in a subshell + # that is rc -e (like mk uses!) + if(builtin cd $1){ + if(flag i) $PLAN9/bin/9 awd || status='' + status='' + } + } + $PLAN9/bin/9 awd } if(flag l && test -r $home/lib/profile) . $home/lib/profile status='' |