From 7c016c56e3894f104e36f786fd148f20e2086331 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 2 Jun 2006 08:23:00 +1000 Subject: [PATCH] Only hide /private directories in pwd function under OS X darcs-hash:20060601222300-ac50b-b08a9425d33cf41d60aa0a42edffa32f521fc2a3.gz --- share/functions/pwd.fish | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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