PWD Tweaks

Tweaked prompt_pwd and pwd to omit the leading /private from some system directories on OS X.

darcs-hash:20060205194908-494f2-936d1346a4cd118f763bea24495edf9829b59748.gz
This commit is contained in:
Nicholas Pilon 2006-02-06 05:49:08 +10:00
parent 749c44fe27
commit d8382acc74

View file

@ -186,7 +186,7 @@ end
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
if test "$PWD" != "$HOME"
printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
else
echo '~'
@ -198,7 +198,7 @@ end
#
function pwd -d "Print working directory"
command pwd | sed -e "s|^$HOME|~|"
command pwd | sed -e 's|/private||' -e "s|^$HOME|~|"
end
#