]> gitweb @ CieloNegro.org - sugar.git/commitdiff
Auto commit by The Sugar System.
authorPHO <pho@cielonegro.org>
Fri, 4 Jan 2013 07:03:04 +0000 (16:03 +0900)
committerPHO <pho@cielonegro.org>
Fri, 4 Jan 2013 07:03:04 +0000 (16:03 +0900)
dot-files/_zshrc

index 11755ad6400f255839747cdea7f9caa34a33230e..d651aa41cb735f896210c2d6895085422947f077 100644 (file)
@@ -79,7 +79,7 @@ function preexec() { # Hook
 }
 
 function precmd() { # Hook
-    local dirinfo=$(print_directory_info $(pwd))
+    local dirinfo="$(print_directory_info $(pwd))"
 
     case $dirinfo in
         "")
@@ -92,7 +92,7 @@ function precmd() { # Hook
 function print_directory_info() {
     local absdir=$1
 
-    if [[ -d $absdir/.git ]] then
+    if [[ -r $absdir/.git ]] then
         # Git
         git branch --no-color 2>/dev/null \
             | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'