[prompt] gitster: use short_pwd
This commit is contained in:
parent
be23020b2e
commit
5f68411637
1 changed files with 2 additions and 2 deletions
|
@ -15,10 +15,10 @@ function get_pwd(){
|
||||||
done
|
done
|
||||||
if [[ $git_root = / ]]; then
|
if [[ $git_root = / ]]; then
|
||||||
unset git_root
|
unset git_root
|
||||||
prompt_short_dir=%~
|
prompt_short_dir="$(short_pwd)"
|
||||||
else
|
else
|
||||||
parent=${git_root%\/*}
|
parent=${git_root%\/*}
|
||||||
prompt_short_dir=${PWD#$parent/}
|
prompt_short_dir=${"$(short_pwd)"#$parent/}
|
||||||
fi
|
fi
|
||||||
print $prompt_short_dir
|
print $prompt_short_dir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue