aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/prompt_pwd.fish
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-06-01 23:02:13 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-06-01 23:02:13 -0700
commit9ca12e9f9d7494c5c38e4bcded768360d681f77d (patch)
tree6645c292ba1cef330a09d6d39fbcd289e6ba5586 /share/functions/prompt_pwd.fish
parent908b07527ed5fe4952f357db73e270da9d09baba (diff)
Squashed commit of the following:
commit 5a577d970a293afe320b6c3280c10c2bd8a1ff50 Merge: 908b075 96941b3 Author: ridiculousfish <corydoras@ridiculousfish.com> Date: Sat Jun 1 22:59:16 2013 -0700 Merge branch 'dotdir-two-chars' of git://github.com/GlitchMr/fish-shell into GlitchMr-dotdir-two-chars commit 96941b3a92e5d7e9dd230e4797ee71285700a41f Author: Konrad Borowski <glitchmr@myopera.com> Date: Sat May 25 09:55:43 2013 +0200 Support BSD sed commit 60652c2bd2d1bbce26c90a010913f0f0d8e9365f Author: Konrad Borowski <glitchmr@myopera.com> Date: Sun May 19 10:58:40 2013 +0200 Show first two characters for dotdirs. Fixes #754.
Diffstat (limited to 'share/functions/prompt_pwd.fish')
-rw-r--r--share/functions/prompt_pwd.fish5
1 files changed, 2 insertions, 3 deletions
diff --git a/share/functions/prompt_pwd.fish b/share/functions/prompt_pwd.fish
index cbc94729..716372f4 100644
--- a/share/functions/prompt_pwd.fish
+++ b/share/functions/prompt_pwd.fish
@@ -1,10 +1,9 @@
-
if test (uname) = Darwin
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
- echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/private||' -e 's-\([^/]\)[^/]*/-\1/-g'
+ echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/private||' -e 's-\([^/.]\)[^/]*/-\1/-g'
end
else
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
- echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/]\)[^/]*/-\1/-g'
+ echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/.]\)[^/]*/-\1/-g'
end
end