aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/prompt_pwd.fish
diff options
context:
space:
mode:
authorGravatar Jonas Hietala <mail@jonashietala.se>2015-08-08 21:59:05 +0200
committerGravatar Jonas Hietala <mail@jonashietala.se>2015-08-08 23:19:01 +0200
commit5238ed309f27aa2a5baf5f96aca38aa0ba8b06fc (patch)
tree94529218d572c34dbadd880add6b83e7f12e7c2a /share/functions/prompt_pwd.fish
parentf6ab0b4d0775bd48ca10ca7f75522dfbd4fde175 (diff)
Match the whole real home directory in prompt_pwd.
Diffstat (limited to 'share/functions/prompt_pwd.fish')
-rw-r--r--share/functions/prompt_pwd.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/prompt_pwd.fish b/share/functions/prompt_pwd.fish
index 921ee429..e44b9649 100644
--- a/share/functions/prompt_pwd.fish
+++ b/share/functions/prompt_pwd.fish
@@ -10,5 +10,5 @@ end
function prompt_pwd -V args_pre -V args_post --description "Print the current working directory, shortened to fit the prompt"
set -l realhome ~
- echo $PWD | sed -e "s|^$realhome|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
+ echo $PWD | sed -e "s|^$realhome\$|~|" -e "s|^$realhome/|~/|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
end