Fix missing slashes in short dir.
authorIain Patterson <me@iain.cx>
Fri, 20 May 2016 12:15:14 +0000 (13:15 +0100)
committerIain Patterson <me@iain.cx>
Tue, 24 May 2016 09:16:34 +0000 (10:16 +0100)
.profile.d/ps1.bashrc

index 4f249c9..991095b 100644 (file)
@@ -240,7 +240,8 @@ function __ps1_short() {
     n=$((n+1))
   done
 
-  echo "$short$dirname"
+  [ "${short:0:1}" = "~" ] || short="/$short"
+  echo "$short/$dirname"
   return $1
 }