Sfoglia il codice sorgente

Fix bash prompt folder display

Without quotes, it was cutting off everything after a space e.g.
"Application Support" would display "Application".
Weiyi Lou 9 anni fa
parent
commit
2a1dbe5ff9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      shell/bashrc

+ 1 - 1
shell/bashrc

@@ -28,7 +28,7 @@ function shortcwd() {
   local folder=$(pwd) fld='[^/]*'
   folder=${folder/$HOME/"~"}
   folder=$(echo $folder | sed 's|.*/\('$fld'/'$fld'/'$fld'\)|\1|')
-  printf $folder
+  printf "$folder"
 }
 
 [ -f ~/.fzf.bash ] && source ~/.fzf.bash