From d8382acc74a27df0a4f81057e716ee5266622026 Mon Sep 17 00:00:00 2001 From: Nicholas Pilon Date: Mon, 6 Feb 2006 05:49:08 +1000 Subject: PWD Tweaks Tweaked prompt_pwd and pwd to omit the leading /private from some system directories on OS X. darcs-hash:20060205194908-494f2-936d1346a4cd118f763bea24495edf9829b59748.gz --- init/fish_function.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init/fish_function.fish') diff --git a/init/fish_function.fish b/init/fish_function.fish index 4a4c8af3..413a2515 100644 --- a/init/fish_function.fish +++ b/init/fish_function.fish @@ -186,7 +186,7 @@ end function prompt_pwd -d "Print the current working directory, shortend to fit the prompt" if test "$PWD" != "$HOME" - printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g') + printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g') echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-' else echo '~' @@ -198,7 +198,7 @@ end # function pwd -d "Print working directory" - command pwd | sed -e "s|^$HOME|~|" + command pwd | sed -e 's|/private||' -e "s|^$HOME|~|" end # -- cgit v1.2.3