# No core dumps
ulimit -c 0
-umask 022
+local _umask
+zstyle -s ':ganneff:config' umask _umask
+_umask=${_umask:-022}
+umask $_umask
+# Tiny helper function to set variables/values according to styles
+# removed after config load
+setvar () {
+ variable=$1
+ default=$2
+ command=${3:-0}
+
+ local tempvar
+ zstyle -s ':ganneff:config' ${variable} tempvar
+ tempvar=${tempvar:-${default}}
+ if (( ${command} )); then
+ ${variable} ${tempvar}
+ else
+ export ${variable}=${tempvar}
+ fi
+}
+
# Want a halfway sane terminal
[[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null
fi
return 0
}
-# Load is-at-least() for more precise version checks Note that this test
-# will *always* fail, if the is-at-least function could not be marked
-# for autoloading. But is-at-least exists since Fri Feb 11 19:46:46 2000
-# +0000, so if you really have an older zsh you really want to upgrade.
-zrcautoload is-at-least || is-at-least() { return 1 }
# Some things need to be done very early
# the following helper functions have been taken from the grml zshrc
return 1
}
+is435(){
+ [[ $ZSH_VERSION == 4.3.<5->* || $ZSH_VERSION == 4.<4->* \
+ || $ZSH_VERSION == <5->* ]] && return 0
+ return 1
+}
+
is437(){
[[ $ZSH_VERSION == 4.3.<7->* || $ZSH_VERSION == 4.<4->* \
|| $ZSH_VERSION == <5->* ]] && return 0
|| ${ZSH_VERSION} == <4->.<->* ]] ; then
printf '-!-\n'
- printf '-!- In this configuration we try to make use of features, that only\n'
- printf '-!- require version 3.1.7 of the shell; That way this setup can be\n'
- printf '-!- used with a wide range of zsh versions, while using fairly\n'
- printf '-!- advanced features in all supported versions.\n'
- printf '-!-\n'
- printf '-!- However, you are running zsh version %s.\n' "$ZSH_VERSION"
- printf '-!-\n'
+ printf '-!- In this configuration we try to only enable features supported by the shell\n'
+ printf '-!- version found on the system. However you are running a particular old zsh\n'
+ printf '-!- "version %s.\n' "$ZSH_VERSION"
printf '-!- While this *may* work, it might as well fail.\n'
+ printf '-!-\n'
printf '-!- Please consider updating to at least version 3.1.7 of zsh.\n'
printf '-!-\n'
printf '-!- DO NOT EXPECT THIS TO WORK FLAWLESSLY!\n'