diff --git a/share/functions/pwd.fish b/share/functions/pwd.fish index 65e8ee7b0..0369b195f 100644 --- a/share/functions/pwd.fish +++ b/share/functions/pwd.fish @@ -1,7 +1,14 @@ # # Make pwd print out the home directory as a tilde. +# Also drop '/private' directories on OS X. # -function pwd -d (N_ "Print working directory") - echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|" -end +if test (uname) = Darwin + function pwd -d (N_ "Print working directory") + echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|" + end +else + function pwd -d (N_ "Print working directory") + echo $PWD | sed -e "s|^$HOME|~|" + end +end \ No newline at end of file