8 # Want a halfway sane terminal
9 [[ -t 0 ]] && /bin
/stty erase
"^H" intr
"^C" susp
"^Z" dsusp
"^Y" stop
"^S" start
"^Q" kill "^U" >& /dev
/null
11 # watch for everybody but me
13 # check every 5 min for login/logout activity
15 WATCHFMT
='%n %a %l from %m at %t.'
17 # autoload wrapper - use this one instead of autoload directly
18 # We need to define this function as early as this, because autoloading
19 # 'is-at-least()' needs it.
20 function zrcautoload
() {
28 for fdir
in ${fpath} ; do
29 [[ -e ${fdir}/${ffile} ]] && (( ffound
= 1 ))
32 (( ffound
== 0 )) && return 1
33 if [[ $ZSH_VERSION == 3.1.
<6-> ||
$ZSH_VERSION == <4->* ]] ; then
34 autoload
-U ${ffile} ||
return 1
36 autoload
${ffile} ||
return 1
40 # Load is-at-least() for more precise version checks Note that this test
41 # will *always* fail, if the is-at-least function could not be marked
42 # for autoloading. But is-at-least exists since Fri Feb 11 19:46:46 2000
43 # +0000, so if you really have an older zsh you really want to upgrade.
44 zrcautoload is-at-least || is-at-least
() { return 1 }
46 # Some things need to be done very early
47 # the following helper functions have been taken from the grml zshrc
48 # (wherever they got them from)
49 # check for version/system
50 # check for versions (compatibility reasons)
52 [[ $ZSH_VERSION == <4->* ]] && return 0
57 [[ $ZSH_VERSION == 4.
<1->* ||
$ZSH_VERSION == <5->* ]] && return 0
62 [[ $ZSH_VERSION == 4.
<2->* ||
$ZSH_VERSION == <5->* ]] && return 0
67 [[ $ZSH_VERSION == 4.2.
<5->* ||
$ZSH_VERSION == 4.
<3->* ||
$ZSH_VERSION == <5->* ]] && return 0
72 [[ $ZSH_VERSION == 4.
<3->* ||
$ZSH_VERSION == <5->* ]] && return 0
77 [[ $ZSH_VERSION == 4.3.
<3->* ||
$ZSH_VERSION == 4.
<4->* \
78 ||
$ZSH_VERSION == <5->* ]] && return 0
83 [[ $ZSH_VERSION == 4.3.
<4->* ||
$ZSH_VERSION == 4.
<4->* \
84 ||
$ZSH_VERSION == <5->* ]] && return 0
89 [[ $ZSH_VERSION == 4.3.
<5->* ||
$ZSH_VERSION == 4.
<4->* \
90 ||
$ZSH_VERSION == <5->* ]] && return 0
95 [[ $ZSH_VERSION == 4.3.
<7->* ||
$ZSH_VERSION == 4.
<4->* \
96 ||
$ZSH_VERSION == <5->* ]] && return 0
101 [[ $ZSH_VERSION == 4.3.
<9->* ||
$ZSH_VERSION == 4.
<4->* \
102 ||
$ZSH_VERSION == <5->* ]] && return 0
107 [[ $OSNAME == Darwin
* ]] && return 0
112 [[ $OSNAME == FreeBSD
* ]] && return 0
116 if ! [[ ${ZSH_VERSION} == 3.1.
<7->* \
117 ||
${ZSH_VERSION} == 3.
<2->.
<->* \
118 ||
${ZSH_VERSION} == <4->.
<->* ]] ; then
121 printf '-!- In this configuration we try to make use of features, that only\n'
122 printf '-!- require version 3.1.7 of the shell; That way this setup can be\n'
123 printf '-!- used with a wide range of zsh versions, while using fairly\n'
124 printf '-!- advanced features in all supported versions.\n'
126 printf '-!- However, you are running zsh version %s.\n' "$ZSH_VERSION"
128 printf '-!- While this *may* work, it might as well fail.\n'
129 printf '-!- Please consider updating to at least version 3.1.7 of zsh.\n'
131 printf '-!- DO NOT EXPECT THIS TO WORK FLAWLESSLY!\n'
132 printf '-!- If it does today, you'\''ve been lucky.\n'
134 printf '-!- Ye been warned!\n'
137 function zstyle
() { : }
140 for paths
in "$fpath[@]"; do
141 for func
in "$paths"/*(N
:t
); do