aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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