fish-shell/share/functions/pwd.fish
liljencrantz 5ecd0e22bf Remove a few calls to the test command in favour of the switch builtin to speed statup up
darcs-hash:20070922190734-75c98-0e63a0ed6685edc2c9aa941f0b26c14466c7af6a.gz
2007-09-23 05:07:34 +10:00

18 lines
352 B
Fish

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