Simplify pwd function

darcs-hash:20051214003313-ac50b-697691ebc5cedddde35307bee465b3083b91c00e.gz
This commit is contained in:
axel 2005-12-14 10:33:13 +10:00
parent e4fa0e1000
commit 16333b0c69

View File

@ -238,13 +238,7 @@ end
#
function pwd -d "Print working directory"
set out (command pwd $argv)
if echo $out| grep \^$HOME >/dev/null
printf \~
echo $out |cut -b (echo $HOME|wc -c)- ^/dev/null
else
printf "%s\n" $out
end
command pwd | sed -re "s|^$HOME|~|"
end
#