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
|| ${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'