aboutsummaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
authorGravatar Nicholas Pilon <npilon@gmail.com>2006-02-06 05:49:08 +1000
committerGravatar Nicholas Pilon <npilon@gmail.com>2006-02-06 05:49:08 +1000
commitd8382acc74a27df0a4f81057e716ee5266622026 (patch)
tree850001c00fb2b51a182db758b6caef250b606d92 /init
parent749c44fe27449404132b0cfa504e465b20b8ec4b (diff)
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
Diffstat (limited to 'init')
-rw-r--r--init/fish_function.fish4
1 files changed, 2 insertions, 2 deletions
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
#