fish-shell/share/functions/pwd.fish
2007-01-16 11:29:18 +10:00

14 lines
No EOL
340 B
Fish

#
# Make pwd print out the home directory as a tilde.
# Also drop '/private' directories on OS X.
#
if test (uname) = Darwin
function pwd --description "Print working directory"
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
end
else
function pwd --description "Print working directory"
echo $PWD | sed -e "s|^$HOME|~|"
end
end