diff options
-rw-r--r-- | share/functions/prompt_pwd.fish | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/prompt_pwd.fish b/share/functions/prompt_pwd.fish index 7f892c70..0396fd04 100644 --- a/share/functions/prompt_pwd.fish +++ b/share/functions/prompt_pwd.fish @@ -2,7 +2,7 @@ if test (uname) = Darwin function prompt_pwd --description "Print the current working directory, shortend to fit the prompt" if test "$PWD" != "$HOME" - printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\(\.\{0,1\}[^/]\)\([^/]*\)-/\1-g') + printf "%s" (echo $PWD|sed -e 's|^/private\(/.\{1,\}\)|\1|' -e "s|^$HOME|~|" -e 's-/\(\.\{0,1\}[^/]\)\([^/]*\)-/\1-g') echo $PWD|sed -e 's-.*/\.\{0,1\}[^/]\([^/]*$\)-\1-' else echo '~' |