7 zstyle
-s ':ganneff:config' umask _umask
10 # Tiny helper function to set variables/values according to styles
11 # removed after config load
18 zstyle
-s ':ganneff:config' ${variable} tempvar
19 tempvar
=${tempvar:-${default}}
20 if (( ${command} )); then
21 ${variable} ${tempvar}
23 export ${variable}=${tempvar}
28 # Want a halfway sane terminal
29 [[ -t 0 ]] && /bin
/stty erase
"^H" intr
"^C" susp
"^Z" dsusp
"^Y" stop
"^S" start
"^Q" kill "^U" >& /dev
/null
31 # watch for everybody but me
33 # check every 5 min for login/logout activity
35 WATCHFMT
='%n %a %l from %m at %t.'
37 # autoload wrapper - use this one instead of autoload directly
38 # We need to define this function as early as this, because autoloading
39 # 'is-at-least()' needs it.
40 function zrcautoload
() {
48 for fdir
in ${fpath} ; do
49 [[ -e ${fdir}/${ffile} ]] && (( ffound
= 1 ))
52 (( ffound
== 0 )) && return 1
53 if [[ $ZSH_VERSION == 3.1.
<6-> ||
$ZSH_VERSION == <4->* ]] ; then
54 autoload
-U ${ffile} ||
return 1
56 autoload
${ffile} ||
return 1
61 # Some things need to be done very early
62 # the following helper functions have been taken from the grml zshrc
63 # (wherever they got them from)
64 # check for version/system
65 # check for versions (compatibility reasons)
67 [[ $ZSH_VERSION == <4->* ]] && return 0
72 [[ $ZSH_VERSION == 4.
<1->* ||
$ZSH_VERSION == <5->* ]] && return 0
77 [[ $ZSH_VERSION == 4.
<2->* ||
$ZSH_VERSION == <5->* ]] && return 0
82 [[ $ZSH_VERSION == 4.2.
<5->* ||
$ZSH_VERSION == 4.
<3->* ||
$ZSH_VERSION == <5->* ]] && return 0
87 [[ $ZSH_VERSION == 4.
<3->* ||
$ZSH_VERSION == <5->* ]] && return 0
92 [[ $ZSH_VERSION == 4.3.
<3->* ||
$ZSH_VERSION == 4.
<4->* \
93 ||
$ZSH_VERSION == <5->* ]] && return 0
98 [[ $ZSH_VERSION == 4.3.
<4->* ||
$ZSH_VERSION == 4.
<4->* \
99 ||
$ZSH_VERSION == <5->* ]] && return 0
104 [[ $ZSH_VERSION == 4.3.
<5->* ||
$ZSH_VERSION == 4.
<4->* \
105 ||
$ZSH_VERSION == <5->* ]] && return 0
110 [[ $ZSH_VERSION == 4.3.
<7->* ||
$ZSH_VERSION == 4.
<4->* \
111 ||
$ZSH_VERSION == <5->* ]] && return 0
116 [[ $ZSH_VERSION == 4.3.
<9->* ||
$ZSH_VERSION == 4.
<4->* \
117 ||
$ZSH_VERSION == <5->* ]] && return 0
122 [[ $OSNAME == Darwin
* ]] && return 0
127 [[ $OSNAME == FreeBSD
* ]] && return 0
131 if ! [[ ${ZSH_VERSION} == 3.1.
<7->* \
132 ||
${ZSH_VERSION} == 3.
<2->.
<->* \
133 ||
${ZSH_VERSION} == <4->.
<->* ]] ; then
136 printf '-!- In this configuration we try to only enable features supported by the shell\n'
137 printf '-!- version found on the system. However you are running a particular old zsh\n'
138 printf '-!- "version %s.\n' "$ZSH_VERSION"
139 printf '-!- While this *may* work, it might as well fail.\n'
141 printf '-!- Please consider updating to at least version 3.1.7 of zsh.\n'
143 printf '-!- DO NOT EXPECT THIS TO WORK FLAWLESSLY!\n'
144 printf '-!- If it does today, you'\''ve been lucky.\n'
146 printf '-!- Ye been warned!\n'
149 function zstyle
() { : }
152 for paths
in "$fpath[@]"; do
153 for func
in "$paths"/*(N
:t
); do