zshrc: 'limit stack' needs zsh 4.2.5 or newer (not just 4.*)
[grml-etc-core.git] / etc / zsh / zshrc
index aecf3d9..6fdb081 100644 (file)
@@ -109,6 +109,11 @@ is42(){
     return 1
 }
 
+is425(){
+    [[ $ZSH_VERSION == 4.2.<5->* || $ZSH_VERSION == 4.<3->* || $ZSH_VERSION == <5->* ]] && return 0
+    return 1
+}
+
 is43(){
     [[ $ZSH_VERSION == 4.<3->* || $ZSH_VERSION == <5->* ]] && return 0
     return 1
@@ -1505,7 +1510,7 @@ else
     # these are the same, just with a lot of colours:
     zstyle ':vcs_info:*' promptactionformat "${MAGENTA}(${NO_COLOUR}%s${MAGENTA})${YELLOW}-${MAGENTA}[${GREEN}%b${YELLOW}|${RED}%a${MAGENTA}]${NO_COLOUR} "
     zstyle ':vcs_info:*' promptformat       "${MAGENTA}(${NO_COLOUR}%s${MAGENTA})${YELLOW}-${MAGENTA}[${GREEN}%b${MAGENTA}]${NO_COLOUR}%} "
-    zstyle ':vcs_info:(svn|bzr)' branchformat "%b${YELLOW]}:%r"
+    zstyle ':vcs_info:(sv[nk]|bzr)' branchformat "%b${YELLOW}:%r"
 fi
 
 # }}}
@@ -1899,7 +1904,7 @@ fi
 
 # {{{ Use hard limits, except for a smaller stack and no core dumps
 unlimit
-is4 && limit stack 8192
+is425 && limit stack 8192
 isgrmlcd && limit core 0 # important for a live-cd-system
 limit -s
 # }}}