X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.profile.d%2Fps1.bashrc;h=4f249c9451b9d9b8450ab53845a1cee229b3ae93;hp=7bd93b7355ca02ab40501bcab65dc55325b1e8e8;hb=2b1bf28a9ce5697d91e668bcb6569ef3202f1b90;hpb=909140c72cfb9c66bcb4189b975f2ccb18c11384;ds=sidebyside diff --git a/.profile.d/ps1.bashrc b/.profile.d/ps1.bashrc index 7bd93b7..4f249c9 100644 --- a/.profile.d/ps1.bashrc +++ b/.profile.d/ps1.bashrc @@ -200,7 +200,8 @@ function __ps1_colon() { } function __ps1_short() { - local pwd=${PWD/#$HOME/\~} + local home=${HOME%%/} + local pwd=${PWD/#$home/\~} local dirtrim=${PROMPT_DIRTRIM//[^0-9]/} if [ "${dirtrim:0:1}" = "0" ]; then