1
0
Fork 0
mirror of synced 2024-11-26 17:25:35 -05:00

[prompt] gitster: use short_pwd

This commit is contained in:
Matt Hamilton 2016-01-06 09:41:40 -05:00
parent be23020b2e
commit 5f68411637

View file

@ -15,10 +15,10 @@ function get_pwd(){
done
if [[ $git_root = / ]]; then
unset git_root
prompt_short_dir=%~
prompt_short_dir="$(short_pwd)"
else
parent=${git_root%\/*}
prompt_short_dir=${PWD#$parent/}
prompt_short_dir=${"$(short_pwd)"#$parent/}
fi
print $prompt_short_dir
}