]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
zsh/rc: Use ${..} for color variables.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 7a7dbae35b9787625ea70be4cce52940ec83ae16..734040f972a1a21d9d63379247fae3ee06a92cd6 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
 source_debug '. ~/.zsh/rc'
 
 
+# Warn when creating global variables from inside a function. Needs to be set
+# before declaring a function.
+setopt warn_create_global
+
+
 # HELPER FUNCTIONS
 
 # Return the name of the program which is called in the foreground with `fg`.
@@ -229,16 +234,16 @@ if [[ $ZSH_VERSION == (4.3.<9->*|4.<4->*|<5->*) ||
     if [[ $ZSH_VERSION == (4.3.<11->*|4.<4->*|<5->*) ||
           -d ~/.zsh/functions/vcs_info ]]; then
         zstyle ':vcs_info:*' formats \
-            "($green%b%u%c$default:$blue%s$default)"
+            "(${green}%b%u%c${default}:${blue}%s${default})"
         zstyle ':vcs_info:*' actionformats \
-            "($green%b%u%c$default/$red%a$default:$blue%s$default)"
+            "(${green}%b%u%c${default}/${red}%a${default}:${blue}%s${default})"
     else
         # In older versions %u and %c are not defined yet and are not
         # correctly expanded.
         zstyle ':vcs_info:*' formats \
-            "($green%b$default:$blue%s$default)"
+            "(${green}%b${default}:${blue}%s${default})"
         zstyle ':vcs_info:*' actionformats \
-            "($green%b$default/$red%a$default:$blue%s$default)"
+            "(${green}%b${default}/${red}%a${default}:${blue}%s${default})"
     fi
     # Set style for formats/actionformats when unstaged (%u) and staged (%c)
     # changes are detected in the repository; check-for-changes must be set to