mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
prompt_pwd: Use tilde expansion to get real full home path
Closes #1133.
This commit is contained in:
parent
ab7af98ded
commit
5638764bad
1 changed files with 2 additions and 1 deletions
|
@ -9,5 +9,6 @@ case 'CYGWIN_*'
|
|||
end
|
||||
|
||||
function prompt_pwd -V args_pre -V args_post --description "Print the current working directory, shortened to fit the prompt"
|
||||
echo $PWD | sed -e "s|^$HOME|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
|
||||
set -l realhome ~
|
||||
echo $PWD | sed -e "s|^$realhome|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue