mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Match the whole real home directory in prompt_pwd.
This commit is contained in:
parent
f6ab0b4d07
commit
5238ed309f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue