From: Iain Patterson Date: Fri, 20 May 2016 12:15:14 +0000 (+0100) Subject: Fix missing slashes in short dir. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=2be76ed436fada8dffc368a0544575eb69098431;p=profile.git Fix missing slashes in short dir. --- diff --git a/.profile.d/ps1.bashrc b/.profile.d/ps1.bashrc index 4f249c9..991095b 100644 --- a/.profile.d/ps1.bashrc +++ b/.profile.d/ps1.bashrc @@ -240,7 +240,8 @@ function __ps1_short() { n=$((n+1)) done - echo "$short$dirname" + [ "${short:0:1}" = "~" ] || short="/$short" + echo "$short/$dirname" return $1 }