fish-shell/share/functions/pwd.fish

18 lines
351 B
Fish
Raw Normal View History

#
# Make pwd print out the home directory as a tilde.
# Also drop '/private' directories on OS X.
#
2010-09-18 02:18:26 +00:00
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