]> gitweb.pimeys.fr Git - config-20-100.git/blob - .zshrc
Handy taf stuff
[config-20-100.git] / .zshrc
1 # Ceci est un zshrc proposé par PEB.
2 # Il est issu d'un zshrc pompé allègrement chez une ancienne nounou
3 # qui l'avait elle-même pompé chez une ancienne nounou, qui l'avait...
4 # Bref.
5 #
6 # La conf est stockée dans le dossier .zsh, en plusieurs parties, base, extra, et local.
7 # local est la conf que vous devriez regarder et éventuellement changer. Cherchez les
8 # #~# dans les fichiers, il y aura des mentions de quoi changer.
9 #
10 # Ce fichier sert à orchestrer tout le bordel.
11 #
12 # Pour faire marcher ce .zshrc, soit vous copiez .zshrc et .zsh dans votre home, soit
13 # vous faites des liens symboliques vers l'endroit de votre home où ils se trouvent.
14 #
15 ###############################################################################
16 # This file is sourced only for interactive shells. It
17 # should contain commands to set up aliases, functions,
18 # options, key bindings, etc.
19 #
20 # Global Order: zshenv, zprofile, zshrc, zlogin
21 ################################################################################
22
23 ZSHDIR=$HOME/.zsh
24
25 # source conf files.
26 for file in $ZSHDIR/rc/base/*; do
27 source $file
28 done
29 # done
30
31 # zmv is a zsh massive renaming tool
32 # Usage:
33 # zmv [OPTIONS] oldpattern newpattern
34 # where oldpattern contains parenthesis surrounding patterns which will
35 # be replaced in turn by $1, $2, ... in newpattern. For example,
36 # zmv '(*).lis' '$1.txt'
37 # renames 'foo.lis' to 'foo.txt', 'my.old.stuff.lis' to 'my.old.stuff.txt',
38 # and so on. Something simpler (for basic commands) is the -W option:
39 # zmv -W '*.lis' '*.txt'
40 # This does the same thing as the first command, but with automatic conversion
41 # of the wildcards into the appropriate syntax. If you combine this with
42 # noglob, you don't even need to quote the arguments. For example,
43 # alias mmv='noglob zmv -W'
44 # mmv *.c.orig orig/*.c
45 zrcautoload zmv
46
47 # I'm not pretty sure of what it does. :D
48 zrcautoload history-search-end
49
50 #m# k ESC-h Call \kbd{run-help} for the 1st word on the command line
51 alias run-help >&/dev/null && unalias run-help
52 for rh in run-help{,-git,-svk,-svn}; do
53 zrcautoload $rh
54 done; unset rh
55
56 # loads completion system
57 if zrcautoload compinit ; then
58 compinit || print 'Notice: no compinit available :('
59 else
60 # creates fake functions
61 print 'Notice: no compinit available :('
62 function zstyle { }
63 function compdef { }
64 fi
65
66 # zed - /usr/share/zsh/functions/Misc/zed
67 #
68 # No other shell could do this.
69 # Edit small files with the command line editor.
70 # Use ^X^W to save, ^C to abort.
71 # Option -f: edit shell functions. (Also if called as fned.)
72 zrcautoload zed
73
74 # Loads .so modules in /usr/lib/i386-linux-gnu/zsh/${ZSHVERSION}/zsh/
75 for mod in complist deltochar mathfunc ; do
76 zmodload -i zsh/${mod} 2>/dev/null || print "Notice: no ${mod} available :("
77 done
78
79 # autoload zsh modules when they are referenced
80 # uses bidimensionnal array to give option to zmodload
81 tmpargs=(
82 a stat
83 a zpty
84 ap mapfile
85 )
86
87 while (( ${#tmpargs} > 0 )) ; do
88 zmodload -${tmpargs[1]} zsh/${tmpargs[2]} ${tmpargs[2]}
89 shift 2 tmpargs
90 done
91 unset tmpargs
92
93 # dirstack handling
94 # I wasn't able to find a good .zsh/rc/* file for this
95 DIRSTACKSIZE=${DIRSTACKSIZE:-20}
96 DIRSTACKFILE=${DIRSTACKFILE:-${HOME}/.zdirs}
97
98 if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
99 dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
100 # "cd -" won't work after login by just setting $OLDPWD, so
101 [[ -d $dirstack[0] ]] && cd $dirstack[0] && cd $OLDPWD
102 fi
103
104 chpwd() {
105 local -ax my_stack
106 my_stack=( ${PWD} ${dirstack} )
107 builtin print -l ${(u)my_stack} >! ${DIRSTACKFILE}
108 }
109
110 # In order to set prompt, and because we love comfort
111 # These files are not mandatory, but removing them
112 # would break the PS1 prompt.
113 for file in $ZSHDIR/rc/extra/*; do
114 source $file
115 done
116
117 # {{{ set prompt
118 if zrcautoload promptinit && promptinit 2>/dev/null ; then
119 promptinit # people should be able to use their favourite prompt
120 else
121 print 'Notice: no promptinit available :('
122 fi
123
124 setopt prompt_subst
125
126 # make sure to use right prompt only when not running a command
127 setopt transient_rprompt
128
129 function ESC_print () {
130 info_print $'\ek' $'\e\\' "$@"
131 }
132 function set_title () {
133 info_print $'\e]0;' $'\a' "$@"
134 }
135
136 function info_print () {
137 local esc_begin esc_end
138 esc_begin="$1"
139 esc_end="$2"
140 shift 2
141 printf '%s' ${esc_begin}
142 for item in "$@" ; do
143 printf '%s ' "$item"
144 done
145 printf '%s' "${esc_end}"
146 }
147
148 #+--------------------------------------+
149 #| PROMPT |
150 #+--------------------------------------+
151
152 # set colors for use in prompts (no longer useful, I'll trash it some day) {{{
153 if zrcautoload colors 2> /dev/null && colors 2>/dev/null ; then
154 BLUE="${fg[blue]}"
155 RED="${fg_bold[red]}"
156 GREEN="${fg[green]}"
157 CYAN="${fg[cyan]}"
158 MAGENTA="${fg[magenta]}"
159 YELLOW="${fg[yellow]}"
160 WHITE="${fg[white]}"
161 NO_COLOUR="${reset_color}"
162 else
163 BLUE=$'\e[1;34m'
164 RED=$'\e[1;31m'
165 GREEN=$'\e[1;32m'
166 CYAN=$'\e[1;36m'
167 WHITE=$'\e[1;37m'
168 MAGENTA=$'\e[1;35m'
169 YELLOW=$'\e[1;33m'
170 NO_COLOUR=$'\e[0m'
171 fi
172
173 # Change vcs_info formats for the grml prompt. The 2nd format sets up
174 # $vcs_info_msg_1_ to contain "zsh: repo-name" used to set our screen title.
175 # TODO: The included vcs_info() version still uses $VCS_INFO_message_N_.
176 # That needs to be the use of $VCS_INFO_message_N_ needs to be changed
177 # to $vcs_info_msg_N_ as soon as we use the included version.
178 if [[ "$TERM" == dumb ]] ; then
179 zstyle ':vcs_info:*' actionformats "(%s)-[%r/%b|%a]" "(%s)-[%r/%b|%a]"
180 zstyle ':vcs_info:*' formats "(%s)-[%r/%b]" "(%s)-[%r/%b]"
181 else
182 # these are the same, just with a lot of colours:
183 zstyle ':vcs_info:*' actionformats "%F{magenta}(%F{no}%s%F{magenta})%F{yellow}-%F{magenta}[%F{green}%r%F{yellow}/%F{green}%b%F{yellow}|%F{red}%a%F{magenta}]%F{no}" \
184 "(%s)-[%r/%b|%a]"
185 zstyle ':vcs_info:*' formats "%F{magenta}(%F{no}%s%F{magenta})%F{yellow}-%F{magenta}[%F{green}%r%F{yellow}/%F{green}%b%F{magenta}]%F{no}" \
186 "(%s)-[%r/%b]"
187 zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "%b%F{red}:%F{yellow}%r"
188 fi
189
190 # Built using /usr/share/zsh/functions/Prompts/prompt_adam2…
191 EXITCODE="%(?..[%?]%1v)"
192
193 # Set of chars used in prompt
194 prompt_tlc='.'
195 prompt_mlc='|'
196 prompt_blc='\`'
197 prompt_hyphen='-'
198
199 # Set of colors used in prompt.
200 #~# Couleurs du prompt
201 prompt_color1='cyan' # hyphens
202 prompt_color2='green' # current directory
203 prompt_color3='yellow' # user@host
204 prompt_color4='cyan' # user input
205 prompt_color5='red' # date
206
207 # see man zshmisc for explanation about %B, %F, %b…
208 prompt_tbox="%B%F{$prompt_color1}${prompt_tlc}%b%F{$prompt_color1}${prompt_hyphen}"
209 prompt_bbox="%B%F{$prompt_color1}${prompt_blc}${prompt_hyphen}%b%F{$prompt_color1}"
210
211 # This is a cute hack. Well I like it, anyway.
212 prompt_bbox_to_mbox=$'%{\e[A\r'"%}%B%F{$prompt_color1}${prompt_mlc}%b%F{$prompt_color1}${prompt_hyphen}%{"$'\e[B%}'
213
214 # left and right parenthesis
215 prompt_l_paren="%B%F{black}("
216 prompt_r_paren="%B%F{black})"
217
218 # User : %n, host : %M
219 prompt_user_host="%b%F{$prompt_color3}%n%B%F{$prompt_color3}@%b%F{$prompt_color3}%M"
220
221 # line 1 is pwd, username, host, hour…
222 prompt_line_1a="$prompt_tbox$prompt_l_paren%B%F{$prompt_color5}%*$prompt_r_paren%b%F{$prompt_color1}$prompt_hyphen$prompt_l_paren%B%F{$prompt_color2}%~$prompt_r_paren%b%F{$prompt_color1}"
223 prompt_line_1b="$prompt_l_paren$prompt_user_host$prompt_r_paren%b%F{$prompt_color1}${prompt_hyphen}"
224
225 # line 2 is prompt
226 prompt_line_2="$prompt_bbox${prompt_hyphen}%B%F{white}"
227 prompt_char="%(!.#.>)"
228 prompt_opts=(cr subst percent)
229
230 # This function is called before each prompt regenation
231 precmd () {
232 setopt noxtrace localoptions extendedglob
233 local prompt_line_1
234 # update VCS information
235 vcs_info
236
237 if [[ $TERM == screen* ]] ; then
238 if [[ -n ${VCS_INFO_message_1_} ]] ; then
239 ESC_print ${VCS_INFO_message_1_}
240 else
241 ESC_print "zsh"
242 fi
243 fi
244
245 RPROMPT="%(?..:()"
246
247 # Generates battery info
248 batcolor
249 RPROMPT="${BATTERY} ${RPROMPT}"
250
251 # adjust title of xterm
252 # see http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
253 [[ ${NOTITLE} -gt 0 ]] && return 0
254 case $TERM in
255 (xterm*|rxvt*)
256 set_title ${(%):-"%n@%m: %~"}
257 ;;
258 esac
259
260 local prompt_line_1a_width=${#${(S%%)prompt_line_1a//(\%([KF1]|)\{*\}|\%[Bbkf])}}
261 local prompt_line_1b_width=${#${(S%%)prompt_line_1b//(\%([KF1]|)\{*\}|\%[Bbkf])}}
262 local prompt_vcs_width=${#${(S%%)VCS_INFO_message_0_//(\%([KF1]|)\{*\}|\%[Bbkf])}}
263
264 local prompt_padding_size=$(( COLUMNS - prompt_line_1a_width - prompt_line_1b_width - prompt_vcs_width - 2 ))
265
266 # Try to fit in long path and user@host, and vcs_info
267 if (( prompt_padding_size > 0 )); then
268 local prompt_padding
269 eval "prompt_padding=\${(l:${prompt_padding_size}::${prompt_hyphen}:)_empty_zz}"
270 prompt_line_1="$prompt_line_1a$prompt_padding$prompt_hyphen$VCS_INFO_message_0_%F{$prompt_color1}$prompt_hyphen$prompt_line_1b"
271 else
272 prompt_padding_size=$(( COLUMNS - prompt_line_1a_width - prompt_vcs_width - 2 ))
273
274 # Didn't fit; try to fit in long path and vcs_info
275 if (( prompt_padding_size > 0 )); then
276 local prompt_padding
277 eval "prompt_padding=\${(l:${prompt_padding_size}::${prompt_hyphen}:)_empty_zz}"
278 prompt_line_1="$prompt_line_1a$prompt_padding$prompt_hyphen$VCS_INFO_message_0_%F{$prompt_color1}$prompt_hyphen"
279 else
280 prompt_padding_size=$(( COLUMNS - prompt_line_1a_width ))
281
282 # Didn't fit; try to fit in just long path
283 if (( prompt_padding_size > 0 )); then
284 eval "prompt_padding=\${(l:${prompt_padding_size}::${prompt_hyphen}:)_empty_zz}"
285 prompt_line_1="$prompt_line_1a$prompt_padding"
286 else
287 # Still didn't fit; truncate
288 local prompt_pwd_size=$(( COLUMNS - 5 ))
289 prompt_line_1="$prompt_tbox$prompt_l_paren%B%F{$prompt_color2}%$prompt_pwd_size<...<%~%<<$prompt_r_paren%b%F{$prompt_color1}$prompt_hyphen"
290 fi
291 fi
292 fi
293
294
295 # And, makes it good
296 PS1="$prompt_line_1$prompt_newline$prompt_line_2%B%F{red}${EXITCODE}%b%F{$prompt_color1}$prompt_hyphen%B%F{white}$prompt_char %b%f%k"
297 PS2="$prompt_line_2$prompt_bbox_to_mbox%B%F{white}%_> %b%f%k"
298 PS3="$prompt_line_2$prompt_bbox_to_mbox%B%F{white}?# %b%f%k"
299
300 # Text color and style for prompt
301 zle_highlight[(r)default:*]="default:fg=$prompt_color4,bold"
302 }
303
304 # preexec() => a function running before every command
305 preexec () {
306 # set hostname if not running on host with name 'grml'
307 if [[ -n "$HOSTNAME" ]] && [[ "$HOSTNAME" != $(hostname) ]] ; then
308 NAME="@$HOSTNAME"
309 fi
310 # get the name of the program currently running and hostname of local machine
311 # set screen window title if running in a screen
312 if [[ "$TERM" == screen* ]] ; then
313 # local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} # don't use hostname
314 local CMD="${1[(wr)^(*=*|sudo|ssh|-*)]}$NAME" # use hostname
315 ESC_print ${CMD}
316 fi
317 # adjust title of xterm
318 [[ ${NOTITLE} -gt 0 ]] && return 0
319 case $TERM in
320 (xterm*|rxvt*)
321 set_title "${(%):-"%n@%m:"}" "$1"
322 ;;
323 esac
324 }
325
326
327 # # set variable debian_chroot if running in a chroot with /etc/debian_chroot
328 # if [[ -z "$debian_chroot" ]] && [[ -r /etc/debian_chroot ]] ; then
329 # debian_chroot=$(cat /etc/debian_chroot)
330 # fi
331 #
332 # # don't use colors on dumb terminals (like emacs):
333 # if [[ "$TERM" == dumb ]] ; then
334 # PROMPT="${debian_chroot:+($debian_chroot)}%n@%m %# "
335 # else
336 # # only if $GRMLPROMPT is set (e.g. via 'GRMLPROMPT=1 zsh') use the extended prompt
337 # # set variable identifying the chroot you work in (used in the prompt below)
338 # if [[ $GRMLPROMPT -gt 0 ]] ; then
339 # PROMPT="${CYAN}[%j running job(s)] ${GREEN}{history#%!} ${RED}%(3L.+.) ${BLUE}%* %D${BLUE}%n${NO_COLOUR}@%m %# "
340 # else
341 # # This assembles the primary prompt string
342 # if (( EUID != 0 )); then
343 # PROMPT="%{${WHITE}%}${debian_chroot:+($debian_chroot)}%{${BLUE}%}%n%{${NO_COLOUR}%}@%m %# "
344 # else
345 # PROMPT="%{${WHITE}%}${debian_chroot:+($debian_chroot)}%{${RED}%}%n%{${NO_COLOUR}%}@%m %# "
346 # fi
347 # fi
348 # fi
349
350 # if we are inside a grml-chroot set a specific prompt theme
351 # if [[ -n "$GRML_CHROOT" ]] ; then
352 # PROMPT="%{$fg[red]%}(CHROOT) %{$fg_bold[red]%}%n%{$fg_no_bold[white]%}@%m %40<...<%B%~%b%<< %\# "
353 # fi
354
355 # {{{ 'hash' some often used directories
356 #d# start
357 hash -d deb=/var/cache/apt/archives
358 hash -d doc=/usr/share/doc
359 hash -d linux=/lib/modules/$(command uname -r)/build/
360 hash -d log=/var/log
361 hash -d slog=/var/log/syslog
362 hash -d src=/usr/src
363 hash -d templ=/usr/share/doc/grml-templates
364 hash -d tt=/usr/share/doc/texttools-doc
365 hash -d www=/var/www
366 #d# end
367 # }}}
368
369 # I like clean prompt, so provide simple way to get that
370 check_com 0 || alias 0='return 0'
371
372 unlimit
373 limit stack 8192
374 limit -s
375
376 # called later (via grmlcomp)
377 # note: use 'zstyle' for getting current settings
378 # press ^Xh (control-x h) for getting tags in context; ^X? (control-x ?) to run complete_debug with trace output
379 grmlcomp() {
380 # TODO: This could use some additional information
381
382 # allow one error for every three characters typed in approximate completer
383 zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
384
385 # don't complete backup files as executables
386 zstyle ':completion:*:complete:-command-::commands' ignored-patterns '(aptitude-*|*\~)'
387
388 # start menu completion only if it could find no unambiguous initial string
389 zstyle ':completion:*:correct:*' insert-unambiguous true
390 zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
391 zstyle ':completion:*:correct:*' original true
392
393 # activate color-completion
394 zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
395
396 # format on completion
397 zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}'
398
399 # complete 'cd -<tab>' with menu
400 zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
401
402 # insert all expansions for expand completer
403 zstyle ':completion:*:expand:*' tag-order all-expansions
404 zstyle ':completion:*:history-words' list false
405
406 # activate menu
407 zstyle ':completion:*:history-words' menu yes
408
409 # ignore duplicate entries
410 zstyle ':completion:*:history-words' remove-all-dups yes
411 zstyle ':completion:*:history-words' stop yes
412
413 # match uppercase from lowercase
414 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
415
416 # separate matches into groups
417 zstyle ':completion:*:matches' group 'yes'
418 zstyle ':completion:*' group-name ''
419
420 # if there are more than 5 options allow selecting from a menu
421 zstyle ':completion:*' menu select=5
422
423 zstyle ':completion:*:messages' format '%d'
424 zstyle ':completion:*:options' auto-description '%d'
425
426 # describe options in full
427 zstyle ':completion:*:options' description 'yes'
428
429 # on processes completion complete all user processes
430 zstyle ':completion:*:processes' command 'ps -au$USER'
431
432 # offer indexes before parameters in subscripts
433 zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
434
435 # provide verbose completion information
436 zstyle ':completion:*' verbose true
437
438 # recent (as of Dec 2007) zsh versions are able to provide descriptions
439 # for commands (read: 1st word in the line) that it will list for the user
440 # to choose from. The following disables that, because it's not exactly fast.
441 zstyle ':completion:*:-command-:*:' verbose false
442
443 # set format for warnings
444 zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for:%{\e[0m%} %d'
445
446 # define files to ignore for zcompile
447 zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)'
448 zstyle ':completion:correct:' prompt 'correct to: %e'
449
450 # Ignore completion functions for commands you don't have:
451 zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'
452
453 # Provide more processes in completion of programs like killall:
454 zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
455
456 # complete manual by their section
457 zstyle ':completion:*:manuals' separate-sections true
458 zstyle ':completion:*:manuals.*' insert-sections true
459 zstyle ':completion:*:man:*' menu yes select
460
461 # provide .. as a completion
462 zstyle ':completion:*' special-dirs ..
463
464 # run rehash on completion so new installed program are found automatically:
465 _force_rehash() {
466 (( CURRENT == 1 )) && rehash
467 return 1
468 }
469
470 ## correction
471 # try to be smart about when to use what completer...
472 setopt correct
473 zstyle -e ':completion:*' completer '
474 if [[ $_last_try != "$HISTNO$BUFFER$CURSOR" ]] ; then
475 _last_try="$HISTNO$BUFFER$CURSOR"
476 reply=(_complete _match _ignored _prefix _files)
477 else
478 if [[ $words[1] == (rm|mv) ]] ; then
479 reply=(_complete _files)
480 else
481 reply=(_oldlist _expand _force_rehash _complete _ignored _correct _approximate _files)
482 fi
483 fi'
484
485 # command for process lists, the local web server details and host completion
486 zstyle ':completion:*:urls' local 'www' '/var/www/' 'public_html'
487
488 # caching
489 [[ -d $ZSHDIR/cache ]] && zstyle ':completion:*' use-cache yes && \
490 zstyle ':completion::complete:*' cache-path $ZSHDIR/cache/
491
492 # host completion /* add brackets as vim can't parse zsh's complex cmdlines 8-) {{{ */
493 [[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
494 [[ -r /etc/hosts ]] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
495 hosts=(
496 $(hostname)
497 "$_ssh_hosts[@]"
498 "$_etc_hosts[@]"
499 grml.org
500 localhost
501 )
502 zstyle ':completion:*:hosts' hosts $hosts
503 # TODO: so, why is this here?
504 # zstyle '*' hosts $hosts
505
506 # use generic completion system for programs not yet defined; (_gnu_generic works
507 # with commands that provide a --help option with "standard" gnu-like output.)
508 for compcom in cp deborphan df feh fetchipac head hnb ipacsum mv \
509 pal stow tail uname ; do
510 [[ -z ${_comps[$compcom]} ]] && compdef _gnu_generic ${compcom}
511 done; unset compcom
512
513 # see upgrade function in this file
514 compdef _hosts upgrade
515 }
516
517 grmlstuff() {
518 # people should use 'grml-x'!
519 startx() {
520 if [[ -e /etc/X11/xorg.conf ]] ; then
521 [[ -x /usr/bin/startx ]] && /usr/bin/startx "$@" || /usr/X11R6/bin/startx "$@"
522 else
523 echo "Please use the script \"grml-x\" for starting the X Window System
524 because there does not exist /etc/X11/xorg.conf yet.
525 If you want to use startx anyway please call \"/usr/bin/startx\"."
526 return -1
527 fi
528 }
529
530 xinit() {
531 if [[ -e /etc/X11/xorg.conf ]] ; then
532 [[ -x /usr/bin/xinit ]] && /usr/bin/xinit || /usr/X11R6/bin/xinit
533 else
534 echo "Please use the script \"grml-x\" for starting the X Window System.
535 because there does not exist /etc/X11/xorg.conf yet.
536 If you want to use xinit anyway please call \"/usr/bin/xinit\"."
537 return -1
538 fi
539 }
540
541 if check_com -c 915resolution; then
542 855resolution() {
543 echo "Please use 915resolution as resolution modifying tool for Intel \
544 graphic chipset."
545 return -1
546 }
547 fi
548
549 #a1# Output version of running grml
550 alias grml-version='cat /etc/grml_version'
551
552 if check_com -c rebuildfstab ; then
553 #a1# Rebuild /etc/fstab
554 alias grml-rebuildfstab='rebuildfstab -v -r -config'
555 fi
556
557 if check_com -c grml-debootstrap ; then
558 debian2hd() {
559 echo "Installing debian to harddisk is possible by using grml-debootstrap."
560 return 1
561 }
562 fi
563 }
564
565 grmlcomp
566
567 # {{{ keephack
568 xsource "/etc/zsh/keephack"
569 # }}}
570
571 #########################################
572 ## YOUR PERSONNAL STUFF HERE  ##
573 #########################################
574
575 # Loads local files
576 for file in $ZSHDIR/rc/local/*; do
577 source $file
578 done
579
580 # Delete remaining xfunctions
581 xunfunction
582
583 # }}}