initial import
[grml.org.git] / zsh / grmlzshrc.html
1 <?xml version="1.0"
2 ?>
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <title>GRMLZSHRC</title>
7 <meta name="generator" content="http://txt2tags.sf.net" />
8 <link rel="stylesheet" type="text/css" href="t2t-modern.css" />
9 </head>
10 <body>
11 <div class="header" id="header">
12 <h1>GRMLZSHRC</h1>
13 <h3>June, 2010</h3>
14 </div>
15 <div class="body" id="body">
16 <h1>NAME</h1>
17 <p>
18 grmlzshrc - grml's zsh setup
19 </p>
20 <h1>SYNOPSIS</h1>
21 <p>
22 <i>zsh</i> [<b>options</b>]...
23 </p>
24 <h1>DESCRIPTION</h1>
25 <p>
26 The grml project provides a fairly exhaustive interactive setup (referred to
27 as <i>grmlzshrc</i> throughout this document) for the amazing unix shell zsh
28 (<a href="http://zsh.sourceforge.net">http://zsh.sourceforge.net</a>). This is the reference manual for that
29 setup.
30 </p>
31 <p>
32 To use <i>grmlzshrc</i>, you need at least version 3.1.7 of zsh (although not all
33 features are enabled in every version).
34 </p>
35 <p>
36 <i>grmlzshrc</i> behaves differently depending on which user loads it. For the
37 root user (<b>EUID</b> == 0) only a subset of features is loaded by default. This
38 behaviour can be altered by setting the <b>GRML_ALWAYS_LOAD_ALL</b> STARTUP
39 VARIABLE (see below). Also the umask(1) for the root user is set to 022,
40 while for regular users it is set to 002. So read/write permissions
41 for the regular user and her group are set for new files (keep that
42 in mind on systems, where regular users share a common group).
43 </p>
44 <h1>STARTUP VARIABLES</h1>
45 <p>
46 Some of the behaviour of <i>grmlzshrc</i> can be altered by setting certain shell
47 variables. These may be set temporarily when starting zsh like this:
48
49 </p>
50 <pre>
51 % BATTERY=1 zsh
52 </pre>
53 <p></p>
54 <p>
55 Or by setting them permanently in <b>zshrc.pre</b> (See AUXILIARY FILES below).
56 </p>
57 <dl>
58 <dt><b>BATTERY</b></dt><dd>
59 If set to a value greater than zero and <i>acpi</i> installed, <i>grmlzshrc</i> will
60 put the battery status into the right hand side interactive prompt.
61 <p></p>
62 </dd>
63 <dt><b>COMMAND_NOT_FOUND</b></dt><dd>
64 A non zero value activates a handler, which is called when a command can not
65 be found. The handler is defined by GRML_ZSH_CNF_HANDLER (see below).
66 <p></p>
67 </dd>
68 <dt><b>GRML_ALWAYS_LOAD_ALL</b></dt><dd>
69 Enables the whole grml setup for root, if set to a non zero value.
70 <p></p>
71 </dd>
72 <dt><b>GRML_ZSH_CNF_HANDLER</b></dt><dd>
73 This variable contains the handler to be used by COMMAND_NOT_FOUND (see above)
74 and defaults to "/usr/share/command-not-found/command-not-found".
75 <p></p>
76 </dd>
77 <dt><b>GRMLSMALL_SPECIFIC</b></dt><dd>
78 Set this to zero to remove items in zsh config, which do not work in
79 grml-small.
80 <p></p>
81 </dd>
82 <dt><b>HISTFILE</b></dt><dd>
83 Where zsh saves the history. Default: ${HOME}/.zsh_history.
84 <p></p>
85 </dd>
86 <dt><b>HISTSIZE</b></dt><dd>
87 Number of commands to be kept in the history. On a grml-CD this defaults to
88 500, on a hard disk installation to 5000.
89 <p></p>
90 </dd>
91 <dt><b>MAILCHECK</b></dt><dd>
92 Sets the frequency in seconds for zsh to check for new mail. Defaults to 30.
93 A value of zero turns off checking.
94 <p></p>
95 </dd>
96 <dt><b>NOCOR</b></dt><dd>
97 Non zero values deactivate automatic correction of commands.
98 <p></p>
99 </dd>
100 <dt><b>NOMENU</b></dt><dd>
101 If set to zero (default), allows selection from a menu, if there are at least
102 five possible options of completion.
103 <p></p>
104 </dd>
105 <dt><b>NOPRECMD</b></dt><dd>
106 A non zero value disables precmd and preexec commands. These are functions
107 that are run before every command (setting xterm/screen titles etc.).
108 <p></p>
109 </dd>
110 <dt><b>REPORTTIME</b></dt><dd>
111 Show time (user, system and cpu) used by external commands, if they run longer
112 than the defined number of seconds (default: 5).
113 <p></p>
114 </dd>
115 <dt><b>SAVEHIST</b></dt><dd>
116 Number of commands to be stored in ${HISTFILE}. Defaults to 1000 on a grml-CD
117 and to 10000 on an installation on hard disk.
118 <p></p>
119 </dd>
120 <dt><b>watch</b></dt><dd>
121 As in tcsh(1) an array of login/logout events to be reported by the shell
122 builtin "log". For details see zshparam(1). Defaults to (notme root).
123 <p></p>
124 </dd>
125 <dt><b>ZSH_NO_DEFAULT_LOCALE</b></dt><dd>
126 Import "/etc/default/locale", if set to zero (default).
127 <p></p>
128 </dd>
129 <dt><b>ZSH_PROFILE_RC</b></dt><dd>
130 A non zero value causes shell functions to be profiled. The results can be
131 obtained with the zprof builtin command (see zshmodules(1) for details).
132 </dd>
133 </dl>
134 <h1>FEATURE DESCRIPTION</h1>
135 <p>
136 This is an in depth description of non-standard features implemented by
137 <i>grmlzshrc</i>.
138 </p>
139 <h2>DIRSTACK HANDLING</h2>
140 <p>
141 The dirstack in <i>grmlzshrc</i> has a persistent nature. It is stored into a
142 file each time zsh's working directory is changed. That file can be configured
143 via the <b>DIRSTACKFILE</b> variable and it defaults to <b>~/.zdirs</b>. The
144 <b>DIRSTACKSIZE</b> variable defaults to <b>20</b> in this setup.
145 </p>
146 <p>
147 The <b>DIRSTACKFILE</b> is loaded each time zsh starts, therefore freshly started
148 zshs inherit the dirstack of the zsh that most recently updated
149 <b>DIRSTACKFILE</b>.
150 </p>
151 <h2>DIRECTORY BASED PROFILES</h2>
152 <p>
153 If you want certain settings to be active in certain directories (and
154 automatically switch back and forth between them), this is what you want.
155
156 </p>
157 <pre>
158 zstyle ':chpwd:profiles:/usr/src/grml(|/|/*)'   profile grml
159 zstyle ':chpwd:profiles:/usr/src/debian(|/|/*)' profile debian
160 </pre>
161 <p></p>
162 <p>
163 When that's done and you enter a directory that matches the pattern
164 in the third part of the context, a function called chpwd_profile_grml,
165 for example, is called (if it exists).
166 </p>
167 <p>
168 If no pattern matches (read: no profile is detected) the profile is
169 set to 'default', which means chpwd_profile_default is attempted to
170 be called.
171 </p>
172 <p>
173 A word about the context (the ':chpwd:profiles:*' stuff in the zstyle
174 command) which is used: The third part in the context is matched against
175 <b>$PWD</b>. That's why using a pattern such as /foo/bar(|/|/*) makes sense.
176 Because that way the profile is detected for all these values of <b>$PWD</b>:
177
178 </p>
179 <pre>
180 /foo/bar
181 /foo/bar/
182 /foo/bar/baz
183 </pre>
184 <p></p>
185 <p>
186 So, if you want to make double damn sure a profile works in /foo/bar
187 and everywhere deeper in that tree, just use (|/|/*) and be happy.
188 </p>
189 <p>
190 The name of the detected profile will be available in a variable called
191 'profile' in your functions. You don't need to do anything, it'll just
192 be there.
193 </p>
194 <p>
195 Then there is the parameter <b>$CHPWD_PROFILE</b> which is set to the profile,
196 that was active up to now. That way you can avoid running code for a
197 profile that is already active, by running code such as the following
198 at the start of your function:
199
200 </p>
201 <pre>
202 function chpwd_profile_grml() {
203     [[ ${profile} == ${CHPWD_PROFILE} ]] &amp;&amp; return 1
204     ...
205 }
206 </pre>
207 <p></p>
208 <p>
209 The initial value for <b>$CHPWD_PROFILE</b> is 'default'.
210 </p>
211 <h3>Signaling availabily/profile changes</h3>
212 <p>
213 If you use this feature and need to know whether it is active in your
214 current shell, there are several ways to do that. Here are two simple
215 ways:
216 </p>
217 <p>
218 a) If knowing if the profiles feature is active when zsh starts is
219    good enough for you, you can put the following snippet into your
220    <i>.zshrc.local</i>:
221
222 </p>
223 <pre>
224 (( ${+functions[chpwd_profiles]} )) &amp;&amp;
225     print "directory profiles active"
226 </pre>
227 <p></p>
228 <p>
229 b) If that is not good enough, and you would prefer to be notified
230    whenever a profile changes, you can solve that by making sure you
231    start <b>every</b> profile function you create like this:
232
233 </p>
234 <pre>
235 function chpwd_profile_myprofilename() {
236     [[ ${profile} == ${CHPWD_PROFILE} ]] &amp;&amp; return 1
237     print "chpwd(): Switching to profile: $profile"
238   ...
239 }
240 </pre>
241 <p></p>
242 <p>
243 That makes sure you only get notified if a profile is <b>changed</b>,
244 not everytime you change directory.
245 </p>
246 <h3>Version requirement</h3>
247 <p>
248 This feature requires zsh <i>4.3.3</i> or newer.
249 </p>
250 <h2>ACCEPTLINE WRAPPER</h2>
251 <p>
252 The <i>accept-line</i> wiget is the one that is taking action when the <b>return</b>
253 key is hit. <i>grmlzshrc</i> uses a wrapper around that widget, which adds new
254 functionality.
255 </p>
256 <p>
257 This wrapper is configured via styles. That means, you issue commands, that look
258 like:
259
260 </p>
261 <pre>
262 zstyle 'context' style value
263 </pre>
264 <p></p>
265 <p>
266 The context namespace, that we are using is 'acceptline'. That means, the actual
267 context for your commands look like: <b>':acceptline:&lt;subcontext&gt;'</b>.
268 </p>
269 <p>
270 Where <b>&lt;subcontext&gt;</b> is one of: <b>default</b>, <b>normal</b>, <b>force</b>, <b>misc</b>
271 or <b>empty</b>.
272 </p>
273 <h3>Recognized Contexts</h3>
274 <dl>
275 <dt><b>default</b></dt><dd>
276 This is the value, the context is initialized with.
277 The <i>compwarnfmt and //rehash</i> styles are looked up in this context.
278 <p></p>
279 </dd>
280 <dt><b>normal</b></dt><dd>
281 If the first word in the command line is either a command, alias, function,
282 builtin or reserved word, you are in this context.
283 <p></p>
284 </dd>
285 <dt><b>force</b></dt><dd>
286 This is the context, that is used if you hit enter again, after being warned
287 about the existence of a _completion for the non-existing command you
288 entered.
289 <p></p>
290 </dd>
291 <dt><b>empty</b></dt><dd>
292 This is the context, you are in if the command line is empty or only
293 consists of whitespace.
294 <p></p>
295 </dd>
296 <dt><b>misc</b></dt><dd>
297 This context is in effect, if you entered something that does not match any
298 of the above. (e.g.: variable assignments).
299 </dd>
300 </dl>
301 <h3>Available Styles</h3>
302 <dl>
303 <dt><b>nocompwarn</b></dt><dd>
304 If you set this style to true, the warning about non existent commands,
305 for which completions exist will not be issued. (Default: <b>false</b>)
306 <p></p>
307 </dd>
308 <dt><b>compwarnfmt</b></dt><dd>
309 The message, that is displayed to warn about the _completion issue.
310 (default: <b>'%c will not execute and completion %f exists.'</b>)
311 '%c' is replaced by the command name, '%f' by the completion's name.
312 <p></p>
313 </dd>
314 <dt><b>rehash</b></dt><dd>
315 If this is set, we'll force rehashing, if appropriate. (Defaults to
316 <b>true</b> in <i>grmlzshrc</i>).
317 <p></p>
318 </dd>
319 <dt><b>actions</b></dt><dd>
320 This can be a list of wigdets to call in a given context. If you need a
321 specific order for these to be called, name them accordingly. The default value
322 is an <b>empty list</b>.
323 <p></p>
324 </dd>
325 <dt><b>default_action</b></dt><dd>
326 The name of a widget, that is called after the widgets from 'actions'.
327 By default, this will be '.accept-line' (which is the built-in accept-line
328 widget).
329 <p></p>
330 </dd>
331 <dt><b>call_default</b></dt><dd>
332 If true in the current context, call the widget in the 'default_action'
333 style. (The default is <b>true</b> in all contexts.)
334 </dd>
335 </dl>
336 <h2>PROMPT</h2>
337 <h2>GNU/SCREEN STATUS SETTING</h2>
338 <p>
339 <i>grmlzshrc</i> sets screen's hardstatus lines to the currently running command
340 or <b>'zsh'</b> if the shell is idling at its prompt. If the current working
341 directory is inside a repository unter version control, screen status is set
342 to: <b>'zsh: &lt;repository name&gt;'</b> via zsh's vcs_info.
343 </p>
344 <h2>PERSISTENT HISTORY</h2>
345 <p>
346 If you got commands you consider important enough to be included in every
347 shell's history, you can put them into ~/.important_commands and they will be
348 available via the usual history lookup widgets.
349 </p>
350 <h1>REFERENCE</h1>
351 <h2>ENVIRONMENT VARIABLES</h2>
352 <p>
353 <i>grmlzshrc</i> sets some environment variables, which influence the
354 behaviour of applications.
355 </p>
356 <dl>
357 <dt><b>BROWSER</b></dt><dd>
358 If X is running this is set to "firefox", otherwise to "w3m".
359 <p></p>
360 </dd>
361 <dt><b>COLORTERM</b></dt><dd>
362 Set to "yes". Some applications read this to learn about properties
363 of the terminal they are running in.
364 <p></p>
365 </dd>
366 <dt><b>EDITOR</b></dt><dd>
367 If not already set, sets the default editor. Falls back to vi(1),
368 if vim(1) is not available.
369 <p></p>
370 </dd>
371 <dt><b>LESS_TERMCAP_*</b></dt><dd>
372 Some environment variables that add colour support to less(1) for viewing
373 man pages. See termcap(5) for details.
374 <p></p>
375 </dd>
376 <dt><b>MAIL</b></dt><dd>
377 The mailbox file for the current user is set to /var/mail/$USER, if not
378 already set otherwise.
379 <p></p>
380 </dd>
381 <dt><b>PAGER</b></dt><dd>
382 Set less(1) as default pager, if not already set to something different.
383 <p></p>
384 </dd>
385 <dt><b>QTDIR</b></dt><dd>
386 Holds the path to shared files for the C++ application framework QT
387 (version 3 or 4).
388 <p></p>
389 </dd>
390 <dt><b>SHELL</b></dt><dd>
391 Set explicitly to /bin/zsh, to prevent certain terminal emulators to
392 default to /bin/sh or /bin/bash.
393 </dd>
394 </dl>
395 <h2>OPTIONS</h2>
396 <p>
397 Apart from zsh's default options, <i>grmlzshrc</i> sets some options
398 that change the behaviour of zsh. Options that change Z-shell's default
399 settings are marked by &lt;grml&gt;. But note, that zsh's defaults vary depending
400 on its emulation mode (csh, ksh, sh, or zsh). For details, see zshoptions(1).
401 </p>
402 <dl>
403 <dt><b>append_history</b></dt><dd>
404 Zsh sessions, that use <i>grmlzshrc</i>, will append their history list to the
405 history file, rather than replace it. Thus, multiple parallel zsh sessions
406 will all have the new entries from their history lists added to the history
407 file, in the order that they exit. The file will still be periodically
408 re-written to trim it when the number of lines grows 20% beyond the value
409 specified by $SAVEHIST.
410 <p></p>
411 </dd>
412 <dt><b>auto_cd</b> &lt;grml&gt;</dt><dd>
413 If a command is issued that can't be executed as a normal command, and the
414 command is the name of a directory, perform the cd command to that directory.
415 <p></p>
416 </dd>
417 <dt><b>auto_pushd</b> &lt;grml&gt;</dt><dd>
418 Make cd push the old directory onto the directory stack.
419 <p></p>
420 </dd>
421 <dt><b>completeinword</b> &lt;grml&gt;</dt><dd>
422 If the cursor is inside a word, completion is done from both ends;
423 instead of moving the cursor to the end of the word first and starting
424 from there.
425 <p></p>
426 </dd>
427 <dt><b>extended_glob</b> &lt;grml&gt;</dt><dd>
428 Treat the '#', '~' and '^' characters as active globbing pattern characters.
429 <p></p>
430 </dd>
431 <dt><b>extended_history</b> &lt;grml&gt;</dt><dd>
432 Save each command's beginning timestamp (in seconds since the epoch) and the
433 duration (in seconds) to the history file.
434 <p></p>
435 </dd>
436 <dt><b>hash_list_all</b></dt><dd>
437 Whenever a command completion is attempted, make sure the entire command
438 path is hashed first. This makes the first completion slower.
439 <p></p>
440 </dd>
441 <dt><b>histignorealldups</b> &lt;grml&gt;</dt><dd>
442 If a new command line being added to the history list duplicates an
443 older one, the older command is removed from the list, even if it is
444 not the previous event.
445 <p></p>
446 </dd>
447 <dt><b>histignorespace</b> &lt;grml&gt;</dt><dd>
448 Remove command lines from the history list when the first character on
449 the line is a space, or when one of the expanded aliases contains a
450 leading space. Note that the command lingers in the internal history
451 until the next command is entered before it vanishes.
452 <p></p>
453 </dd>
454 <dt><b>longlistjobs</b> &lt;grml&gt;</dt><dd>
455 List jobs in long format by default.
456 <p></p>
457 </dd>
458 <dt><b>nobeep</b> &lt;grml&gt;</dt><dd>
459 Avoid to beep on errors in zsh command line editing (zle).
460 <p></p>
461 </dd>
462 <dt><b>noglobdots</b></dt><dd>
463 A wildcard character never matches a leading '.'.
464 <p></p>
465 </dd>
466 <dt><b>nohup</b> &lt;grml&gt;</dt><dd>
467 Do not send the hangup signal (HUP:1) to running jobs when the shell exits.
468 <p></p>
469 </dd>
470 <dt><b>nonomatch</b> &lt;grml&gt;</dt><dd>
471 If a pattern for filename generation has no matches, do not print an error
472 and leave it unchanged in the argument list. This also applies to file
473 expansion of an initial `~' or `='.
474 <p></p>
475 </dd>
476 <dt><b>notify</b></dt><dd>
477 Report the status of background jobs immediately, rather than waiting until
478 just before printing a prompt.
479 <p></p>
480 </dd>
481 <dt><b>pushd_ignore_dups</b> &lt;grml&gt;</dt><dd>
482 Don't push multiple copies of the same directory onto the directory stack.
483 <p></p>
484 </dd>
485 <dt><b>share_history</b> &lt;grml&gt;</dt><dd>
486 As each line is added to the history file, it is checked to see if anything
487 else was written out by another shell, and if so it is included in the
488 history of the current shell too. Using !-style history, the commands from
489 the other sessions will not appear in the history list unless you explicitly
490 type the "history" command. This option is activated for zsh versions &gt;= 4,
491 only.
492 </dd>
493 </dl>
494 <h2>KEYBINDINGS</h2>
495 <p>
496 Apart from zsh's default key bindings, <i>grmlzshrc</i> comes with its own set of
497 key bindings. Note that bindings like <b>ESC-e</b> can also be typed as <b>ALT-e</b>
498 on PC keyboards.
499 </p>
500 <dl>
501 <dt><b>ESC-e</b></dt><dd>
502 Edit the current command buffer in your favourite editor.
503 <p></p>
504 </dd>
505 <dt><b>ESC-v</b></dt><dd>
506 Deletes a word left of the cursor; seeing '/' as additional word separator.
507 <p></p>
508 </dd>
509 <dt><b>CTRL-x-1</b></dt><dd>
510 Jump right after the first word.
511 <p></p>
512 </dd>
513 <dt><b>CTRL-x-p</b></dt><dd>
514 Searches the last occurence of string before the cursor in the command history.
515 <p></p>
516 </dd>
517 <dt><b>CTRL-z</b></dt><dd>
518 Brings a job, which got suspended with CTRL-z back to foreground.
519 </dd>
520 </dl>
521 <h2>SHELL FUNCTIONS</h2>
522 <p>
523 <i>grmlzshrc</i> comes with a wide array of defined shell functions to ease the
524 user's life.
525 </p>
526 <dl>
527 <dt><b>2html()</b></dt><dd>
528 Converts plaintext files to HTML using vim. The output is written to
529 &lt;filename&gt;.html.
530 <p></p>
531 </dd>
532 <dt><b>855resolution()</b></dt><dd>
533 If 915resolution is available, issues a warning to the user to run it instead
534 to modify the resolution on intel graphics chipsets.
535 <p></p>
536 </dd>
537 <dt><b>accessed()</b></dt><dd>
538 Lists files in current directory, which have been accessed within the
539 last N days. N is an integer to be passed as first and only argument.
540 If no argument is specified N is set to 1.
541 <p></p>
542 </dd>
543 <dt><b>agoogle()</b></dt><dd>
544 Searches for USENET postings from authors using google groups.
545 <p></p>
546 </dd>
547 <dt><b>allulimit()</b></dt><dd>
548 Sets all ulimit values to "unlimited".
549 <p></p>
550 </dd>
551 <dt><b>ansi-colors()</b></dt><dd>
552 Prints a colored table of available ansi color codes (to be used in escape
553 sequences) and the colors they represent.
554 <p></p>
555 </dd>
556 <dt><b>any()</b></dt><dd>
557 Lists processes matching given pattern.
558 <p></p>
559 </dd>
560 <dt><b>aoeu(), asdf(), uiae()</b></dt><dd>
561 Pressing the 'asdf' keys toggles between dvorak or neon and us keyboard
562 layout.
563 <p></p>
564 </dd>
565 <dt><b>apache2-ssl-certificate()</b></dt><dd>
566 Advices the user how to create self signed certificates.
567 <p></p>
568 </dd>
569 <dt><b>asc()</b></dt><dd>
570 Login on the host provided as argument using autossh. Then reattach a GNU screen
571 session if a detached session is around or detach a currently attached screen or
572 else start a new screen.  This is especially useful for roadwarriors using GNU
573 screen and ssh.
574 <p></p>
575 </dd>
576 <dt><b>audioburn()</b></dt><dd>
577 Burns the files in ~/ripps (see audiorip() below) to an audio CD.
578 Then prompts the user if she wants to remove that directory. You might need
579 to tell audioburn which cdrom device to use like:
580 "DEVICE=/dev/cdrom audioburn"
581 <p></p>
582 </dd>
583 <dt><b>audiorip()</b></dt><dd>
584 Creates directory ~/ripps, if it does not exist. Then rips audio CD into
585 it. Then prompts the user if she wants to burn a audio CD with audioburn()
586 (see above). You might need to tell audiorip which cdrom device to use like:
587 "DEVICE=/dev/cdrom audioburn"
588 <p></p>
589 </dd>
590 <dt><b>bk()</b></dt><dd>
591 Simple backup of a file or directory using cp(1). The target file name is the
592 original name plus a time stamp attached. Symlinks and file attributes like mode,
593 ownership and timestamps are preserved.
594 <p></p>
595 </dd>
596 <dt><b>brltty()</b></dt><dd>
597 The brltty(1) program provides a braille display, so a blind person can access
598 the console screen. This wrapper function works around problems with some
599 environments (f. e. utf8).
600 <p></p>
601 </dd>
602 <dt><b>cdiff()</b></dt><dd>
603 Runs a recursive diff(1) over two given directories trying to find the
604 smallest set of changes. Three lines of context will be printed and binary
605 files filtered out.
606 <p></p>
607 </dd>
608 <dt><b>cdrecord()</b></dt><dd>
609 If the original cdrecord is not installed, issues a warning to the user to
610 use the wodim binary instead. Wodim is the debian fork of Joerg Schillings
611 cdrecord.
612 <p></p>
613 </dd>
614 <dt><b>changed()</b></dt><dd>
615 Lists files in current directory, which have been changed within the
616 last N days. N is an integer to be passed as first and only argument.
617 If no argument is specified N is set to 1.
618 <p></p>
619 </dd>
620 <dt><b>check_com()</b></dt><dd>
621 Returns true if given command exists either as program, function, alias,
622 builtin or reserved word. If the option -c is given, only returns true,
623 if command is a program.
624 <p></p>
625 </dd>
626 <dt><b>checkhome()</b></dt><dd>
627 Changes directory to $HOME on first invocation of zsh. This is neccessary on
628 grml systems with autologin.
629 <p></p>
630 </dd>
631 <dt><b>cl()</b></dt><dd>
632 Changes current directory to the one supplied by argument and lists the files
633 in it, including file names starting with ".".
634 <p></p>
635 </dd>
636 <dt><b>cvsa()</b></dt><dd>
637 Adds and commits the given files using cvs(1). The commit message will be
638 'initial checkin'.
639 <p></p>
640 </dd>
641 <dt><b>cvsd()</b></dt><dd>
642 Shows a cvs diff of the arguments in $PAGER.
643 <p></p>
644 </dd>
645 <dt><b>cvsl()</b></dt><dd>
646 Shows the cvs log in $PAGER.
647 <p></p>
648 </dd>
649 <dt><b>cvsq()</b></dt><dd>
650 Runs a cvs update.
651 <p></p>
652 </dd>
653 <dt><b>cvsr()</b></dt><dd>
654 Generates a changelog using rcs2log and shows it in $PAGER.
655 <p></p>
656 </dd>
657 <dt><b>cvss()</b></dt><dd>
658 Shows cvs status of given files.
659 <p></p>
660 </dd>
661 <dt><b>d()</b></dt><dd>
662 Presents a numbered listing of the directory stack. Then changes current
663 working directory to the one chosen by the user.
664 <p></p>
665 </dd>
666 <dt><b>dchange()</b></dt><dd>
667 Shows the changelog of given package in $PAGER.
668 <p></p>
669 </dd>
670 <dt><b>debbug()</b></dt><dd>
671 Searches the Debian bug tracking system (bugs.debian.org) for Bug numbers,
672 email addresses of submitters or any string given on the command line.
673 <p></p>
674 </dd>
675 <dt><b>debbugm()</b></dt><dd>
676 Shows bug report for debian given by number in mailbox format.
677 <p></p>
678 </dd>
679 <dt><b>debian2hd()</b></dt><dd>
680 Tells the user to use grml-debootstrap, if she wants to install debian to
681 harddisk.
682 <p></p>
683 </dd>
684 <dt><b>deswap()</b></dt><dd>
685 A trick from $LINUX-KERNELSOURCE/Documentation/power/swsusp.txt. It brings
686 back interactive responsiveness after suspend, when the system is swapping
687 heavily.
688 <p></p>
689 </dd>
690 <dt><b>dirspace()</b></dt><dd>
691 Shows the disk usage of the directories given in human readable format;
692 defaults to $path.
693 <p></p>
694 </dd>
695 <dt><b>disassemble()</b></dt><dd>
696 Translates C source code to assembly and ouputs both.
697 <p></p>
698 </dd>
699 <dt><b>dmoz()</b></dt><dd>
700 Searches for the first argument (optional) in the Open Directory Project
701 (See <a href="http://www.dmoz.org/docs/en/about.html">http://www.dmoz.org/docs/en/about.html</a>).
702 <p></p>
703 </dd>
704 <dt><b>dnews()</b></dt><dd>
705 Shows the NEWS file for the given package in $PAGER.
706 <p></p>
707 </dd>
708 <dt><b>doc()</b></dt><dd>
709 Takes packagename as argument. Sets current working directory to
710 /usr/share/doc/&lt;packagename&gt; and prints out a directory listing.
711 <p></p>
712 </dd>
713 <dt><b>dwicti()</b></dt><dd>
714 Looks up the first argument (optional) in the german Wiktionary
715 which is an online dictionary (See: <a href="http://de.wiktionary.org/">http://de.wiktionary.org/</a>).
716 <p></p>
717 </dd>
718 <dt><b>edalias()</b></dt><dd>
719 Edit given alias.
720 <p></p>
721 </dd>
722 <dt><b>edfunc()</b></dt><dd>
723 Edit given shell function.
724 <p></p>
725 </dd>
726 <dt><b>ewicti()</b></dt><dd>
727 Looks up the first argument (optional in the english Wiktionary
728 which is an online dictionary (See: <a href="http://en.wiktionary.org/">http://en.wiktionary.org/</a>).
729 <p></p>
730 </dd>
731 <dt><b>exirename()</b></dt><dd>
732 Renames image files based on date/time informations in their exif headers.
733 <p></p>
734 </dd>
735 <dt><b>fir()</b></dt><dd>
736 Opens given URL with Firefox (Iceweasel on Debian). If there is already an
737 instance of firefox running, attaches to the first window found and opens the
738 URL in a new tab (this even works across an ssh session).
739 <p></p>
740 </dd>
741 <dt><b>fluxkey-change()</b></dt><dd>
742 Switches the key combinations for changing current workspace under fluxbox(1)
743 from Alt-[0-9] to Alt-F[0-9] and vice versa by rewriting $HOME/.fluxbox/keys.
744 Requires the window manager to reread configuration to take effect.
745 <p></p>
746 </dd>
747 <dt><b>freload()</b></dt><dd>
748 Reloads an autoloadable shell function (See autoload in zshbuiltins(1)).
749 <p></p>
750 </dd>
751 <dt><b>genthumbs()</b></dt><dd>
752 A simple thumbnails generator. Resizes images (i. e. files that end in ".jpg",
753 ".jpeg", ".gif" or ".png") to 100x200. Output files are named "thumb-&lt;original
754 filename&gt;". Creates an index.html with title "Images" showing the
755 thumbnails as clickable links to the respective original file.
756 <i>Warning:</i> On start genthumbs() silently removes a possibly existing "index.html"
757 and all files and/or directories beginning with "thumb-" in current directory!
758 <p></p>
759 </dd>
760 <dt><b>get_tw_cli()</b></dt><dd>
761 Fetches 3ware RAID controller software using get_3ware(1).
762 <p></p>
763 </dd>
764 <dt><b>gex()</b></dt><dd>
765 Performs an exact (i. e. quoted) web search using Google.
766 <p></p>
767 </dd>
768 <dt><b>ggogle()</b></dt><dd>
769 Searches the arguments on Google Groups, a web to USENET gateway.
770 <p></p>
771 </dd>
772 <dt><b>google()</b></dt><dd>
773 Searches the search engine Google using arguments as search string.
774 <p></p>
775 </dd>
776 <dt><b>greph()</b></dt><dd>
777 Searches the zsh command history for a regular expression.
778 <p></p>
779 </dd>
780 <dt><b>hex()</b></dt><dd>
781 Prints the hexadecimal representation of the number supplied as argument
782 (base ten only).
783 <p></p>
784 </dd>
785 <dt><b>hgdi()</b></dt><dd>
786 Use GNU diff with options -ubwd for mercurial.
787 <p></p>
788 </dd>
789 <dt><b>hgstat()</b></dt><dd>
790 Displays diffstat between the revision given as argument and tip (no
791 argument means last revision).
792 <p></p>
793 </dd>
794 <dt><b>hidiff()</b></dt><dd>
795 Outputs highlighted diff; needs highstring(1).
796 <p></p>
797 </dd>
798 <dt><b>hl()</b></dt><dd>
799 Shows source files in less(1) with syntax highlighting. Run "hl -h"
800 for detailed usage information.
801 <p></p>
802 </dd>
803 <dt><b>ic_get()</b></dt><dd>
804 Queries IMAP server (first parameter) for its capabilities. Takes
805 port number as optional second argument.
806 <p></p>
807 </dd>
808 <dt><b>ipv6-tunnel()</b></dt><dd>
809 Sets up an IPv6 tunnel on interface sit1. Needs one argument -
810 either "start", "stop" or "status".
811 <p></p>
812 </dd>
813 <dt><b>is4()</b></dt><dd>
814 Returns true, if zsh version is equal or greater than 4, else false.
815 <p></p>
816 </dd>
817 <dt><b>is41()</b></dt><dd>
818 Returns true, if zsh version is equal or greater than 4.1, else false.
819 <p></p>
820 </dd>
821 <dt><b>is42()</b></dt><dd>
822 Returns true, if zsh version is equal or greater than 4.2, else false.
823 <p></p>
824 </dd>
825 <dt><b>is425()</b></dt><dd>
826 Returns true, if zsh version is equal or greater than 4.2.5, else false.
827 <p></p>
828 </dd>
829 <dt><b>is43()</b></dt><dd>
830 Returns true, if zsh version is equal or greater than 4.3, else false.
831 <p></p>
832 </dd>
833 <dt><b>is433()</b></dt><dd>
834 Returns true, if zsh version is equal or greater than 4.3.3, else false.
835 <p></p>
836 </dd>
837 <dt><b>isdarwin()</b></dt><dd>
838 Returns true, if running on darwin, else false.
839 <p></p>
840 </dd>
841 <dt><b>isgrml()</b></dt><dd>
842 Returns true, if running on a grml system, else false.
843 <p></p>
844 </dd>
845 <dt><b>isgrmlcd()</b></dt><dd>
846 Returns true, if running on a grml system from a live cd, else false.
847 <p></p>
848 </dd>
849 <dt><b>isgrmlsmall()</b></dt><dd>
850 Returns true, if run on grml-small, else false.
851 <p></p>
852 </dd>
853 <dt><b>iso2utf()</b></dt><dd>
854 Changes every occurrence of the string iso885915 or ISO885915 in
855 environment variables to UTF-8.
856 <p></p>
857 </dd>
858 <dt><b>isutfenv()</b></dt><dd>
859 Returns true, if run within an utf environment, else false.
860 <p></p>
861 </dd>
862 <dt><b>iwclient()</b></dt><dd>
863 Searches a wireless interface and runs dhclient(8) on it.
864 <p></p>
865 </dd>
866 <dt><b>lcheck()</b></dt><dd>
867 Lists libraries that define the symbol containing the string given as
868 parameter.
869 <p></p>
870 </dd>
871 <dt><b>limg()</b></dt><dd>
872 Lists images (i. e. files ending with ".jpg", ".gif" or ".png") in current
873 directory.
874 <p></p>
875 </dd>
876 <dt><b>linenr()</b></dt><dd>
877 Prints specified range of (numbered) lines of a file.
878 Usage: linenr &lt;start&gt;[,&lt;end&gt;] &lt;file&gt;
879 <p></p>
880 </dd>
881 <dt><b>makereadable()</b></dt><dd>
882 Creates a PostScript and a PDF file (basename as first argument) from
883 source code files.
884 <p></p>
885 </dd>
886 <dt><b>man2()</b></dt><dd>
887 Displays manpage in a streched style.
888 <p></p>
889 </dd>
890 <dt><b>manzsh()</b></dt><dd>
891 Shows the zshall manpage and jumps to the first match of the regular
892 expression optionally given as argument (Needs qma(1)).
893 <p></p>
894 </dd>
895 <dt><b>mcd()</b></dt><dd>
896 Creates directory including parent directories, if necessary. Then changes
897 current working directory to it.
898 <p></p>
899 </dd>
900 <dt><b>mdiff()</b></dt><dd>
901 Diffs the two arguments recursively and writes the
902 output (unified format) to a timestamped file.
903 <p></p>
904 </dd>
905 <dt><b>memusage()</b></dt><dd>
906 Prints the summarized memory usage in bytes.
907 <p></p>
908 </dd>
909 <dt><b>mggogle()</b></dt><dd>
910 Searches Google Groups for a USENET message-ID.
911 <p></p>
912 </dd>
913 <dt><b>minimal-shell()</b></dt><dd>
914 Spawns a minimally set up MirBSD Korn shell. It references no files in /usr,
915 so that file system can be unmounted.
916 <p></p>
917 </dd>
918 <dt><b>mkaudiocd()</b></dt><dd>
919 Renames all mp3 files in ~/ripps (see audiorip above) to lowercase and
920 replaces spaces in file names with underscores. Then mkaudiocd()
921 normalizes the files and recodes them to WAV.
922 <p></p>
923 </dd>
924 <dt><b>mkiso()</b></dt><dd>
925 Creates an iso9660 filesystem image with Rockridge and Joliet extensions
926 enabled using mkisofs(8). Prompts the user for volume name, filename and
927 target directory.
928 <p></p>
929 </dd>
930 <dt><b>mkmaildir()</b></dt><dd>
931 Creates a directory with first parameter as name inside $MAILDIR_ROOT
932 (defaults to $HOME/Mail) and subdirectories cur, new and tmp.
933 <p></p>
934 </dd>
935 <dt><b>mmake()</b></dt><dd>
936 Runs "make install" and logs the output under ~/.errorlogs/; useful for
937 a clean deinstall later.
938 <p></p>
939 </dd>
940 <dt><b>modified()</b></dt><dd>
941 Lists files in current directory, which have been modified within the
942 last N days. N is an integer to be passed as first and only argument.
943 If no argument is specified N is set to 1.
944 <p></p>
945 </dd>
946 <dt><b>netcraft()</b></dt><dd>
947 Asks netcraft.com for informations about the site given as argument.
948 <p></p>
949 </dd>
950 <dt><b>nt()</b></dt><dd>
951 A helper function for the "e" glob qualifier to list all files newer
952 than a reference file.
953
954 Example usages:
955 <pre>
956 % NTREF=/reference/file
957 % ls -l *(e:nt:)
958 % # Inline:
959 % ls -l *(e:'nt /reference/file':)
960 </pre>
961 <p></p>
962 </dd>
963 <dt><b>ogg2mp3_192()</b></dt><dd>
964 Recodes an ogg file to mp3 with a bitrate of 192.
965 <p></p>
966 </dd>
967 <dt><b>oleo()</b></dt><dd>
968 Translates the given word using the english - german online
969 dictionary dict.leo.org.
970 <p></p>
971 </dd>
972 <dt><b>peval()</b></dt><dd>
973 Evaluates a perl expression; useful as command line
974 calculator, therefore also available as "calc".
975 <p></p>
976 </dd>
977 <dt><b>plap()</b></dt><dd>
978 Lists all occurrences of the string given as argument in current $PATH.
979 <p></p>
980 </dd>
981 <dt><b>profile()</b></dt><dd>
982 Runs a command in $SHELL with profiling enabled (See startup variable
983 ZSH_PROFILE_RC above).
984 <p></p>
985 </dd>
986 <dt><b>purge()</b></dt><dd>
987 Removes typical temporary files (i. e. files like "*~", ".*~", "#*#", "*.o",
988 "a.out", "*.core", "*.cmo", "*.cmi" and ".*.swp") from current directory.
989 Asks for confirmation.
990 <p></p>
991 </dd>
992 <dt><b>readme()</b></dt><dd>
993 Opens all README-like files in current working directory with the program
994 defined in the $PAGER environment variable.
995 <p></p>
996 </dd>
997 <dt><b>refunc()</b></dt><dd>
998 Reloads functions given as parameters.
999 <p></p>
1000 </dd>
1001 <dt><b>regcheck()</b></dt><dd>
1002 Checks whether a regular expression (first parameter) matches a string
1003 (second parameter) using perl.
1004 <p></p>
1005 </dd>
1006 <dt><b>salias()</b></dt><dd>
1007 Creates an alias whith sudo prepended, if $EUID is not zero. Run "salias -h"
1008 for details. See also xunfunction() below.
1009 <p></p>
1010 </dd>
1011 <dt><b>selhist()</b></dt><dd>
1012 Greps the history for the string provided as parameter and shows the numbered
1013 findings in default pager. On exit of the pager the user is prompted for a
1014 number. The shells readline buffer is then filled with the corresponding
1015 command line.
1016 <p></p>
1017 </dd>
1018 <dt><b>setenv()</b></dt><dd>
1019 Reimplementation of the csh(1) builtin setenv.
1020 <p></p>
1021 </dd>
1022 <dt><b>show-archive()</b></dt><dd>
1023 Lists the contents of a (compressed) archive with the appropriate programs.
1024 The choice is made along the filename extension.
1025 <p></p>
1026 </dd>
1027 <dt><b>shtar()</b></dt><dd>
1028 Lists the content of a gzipped tar archive in default pager.
1029 <p></p>
1030 </dd>
1031 <dt><b>shzip()</b></dt><dd>
1032 Shows the content of a zip archive in default pager.
1033 <p></p>
1034 </dd>
1035 <dt><b>simple-extract()</b></dt><dd>
1036 Tries to uncompress/unpack given file with the appropriate programs. The
1037 choice is made along the filename ending.
1038 <p></p>
1039 </dd>
1040 <dt><b>sll()</b></dt><dd>
1041 Prints details of symlinks given as arguments.
1042 <p></p>
1043 </dd>
1044 <dt><b>slow_print()</b></dt><dd>
1045 Prints the arguments slowly by sleeping 0.08 seconds between each character.
1046 <p></p>
1047 </dd>
1048 <dt><b>smartcompress()</b></dt><dd>
1049 Compresses/archives the file given as first parameter. Takes an optional
1050 second argument, which denotes the compression/archive type as typical
1051 filename extension; defaults to "tar.gz".
1052 <p></p>
1053 </dd>
1054 <dt><b>smart-indent()</b></dt><dd>
1055 Indents C source code files given; uses Kernighan &amp; Ritchie style.
1056 <p></p>
1057 </dd>
1058 <dt><b>sshot()</b></dt><dd>
1059 Creates directory named shots in user's home directory, if it does not yet
1060 exist and changes current working directory to it. Then sleeps 5 seconds,
1061 so you have plenty of time to switch desktops/windows. Then makes a screenshot
1062 of the current desktop. The result is stored in ~/shots to a timestamped
1063 jpg file.
1064 <p></p>
1065 </dd>
1066 <dt><b>ssl-cert-fingerprints</b></dt><dd>
1067 Prints the SHA512, SHA256, SHA1 and MD5 digest of a x509 certificate.
1068 First and only parameter must be a file containing a certificate. Use
1069 /dev/stdin as file if you want to pipe a certificate to these
1070 functions.
1071 <p></p>
1072 </dd>
1073 <dt><b>ssl-cert-info</b></dt><dd>
1074 Prints all information of a x509 certificate including the SHA512,
1075 SHA256, SHA1 and MD5 digests. First and only parameter must be a file
1076 containing a certificate. Use /dev/stdin as file if you want to pipe a
1077 certificate to this function.
1078 <p></p>
1079 </dd>
1080 <dt><b>ssl-cert-sha512(), ssl-cert-sha256(), ssl-cert-sha1(), ssl-cert-md5()</b></dt><dd>
1081 Prints the SHA512, SHA256, SHA1 respective MD5 digest of a x509
1082 certificate. First and only parameter must be a file containing a
1083 certificate. Use /dev/stdin as file if you want to pipe a certificate
1084 to this function.
1085 <p></p>
1086 </dd>
1087 <dt><b>Start(), Restart(), Stop(), Force-Reload(), Reload()</b></dt><dd>
1088 Functions for controlling daemons.
1089 <pre>
1090 Example usage:
1091 % Restart ssh
1092 </pre>
1093 <p></p>
1094 </dd>
1095 <dt><b>status()</b></dt><dd>
1096 Shows some information about current system status.
1097 <p></p>
1098 </dd>
1099 <dt><b>swiki()</b></dt><dd>
1100 Searches articles in the german Wikipedia for the term given as argument.
1101 <p></p>
1102 </dd>
1103 <dt><b>swspeak()</b></dt><dd>
1104 Sets up software synthesizer by calling swspeak-setup(8). Kernel boot option
1105 swspeak must be set for this to work.
1106 <p></p>
1107 </dd>
1108 <dt><b>trans()</b></dt><dd>
1109 Translates a word from german to english (-D) or vice versa (-E).
1110 <p></p>
1111 </dd>
1112 <dt><b>uchange()</b></dt><dd>
1113 Shows upstreams changelog of a given package in $PAGER.
1114 <p></p>
1115 </dd>
1116 <dt><b>udiff()</b></dt><dd>
1117 Makes a unified diff of the command line arguments trying hard to find a
1118 smaller set of changes. Descends recursively into subdirectories. Ignores
1119 hows some information about current status.
1120 <p></p>
1121 </dd>
1122 <dt><b>uopen()</b></dt><dd>
1123 Downloads and displays a file using a suitable program for its
1124 Content-Type.
1125 <p></p>
1126 </dd>
1127 <dt><b>uprint()</b></dt><dd>
1128 Works around the "print -l ${(u)foo}"-limitation on zsh older than 4.2.
1129 <p></p>
1130 </dd>
1131 <dt><b>urlencode()</b></dt><dd>
1132 Takes a string as its first argument and prints it RFC 2396 URL encoded to
1133 standard out.
1134 <p></p>
1135 </dd>
1136 <dt><b>utf2iso()</b></dt><dd>
1137 Changes every occurrence of the string UTF-8 or utf-8 in environment
1138 variables to iso885915.
1139 <p></p>
1140 </dd>
1141 <dt><b>viless()</b></dt><dd>
1142 Vim as pager.
1143 <p></p>
1144 </dd>
1145 <dt><b>vim()</b></dt><dd>
1146 Wrapper for vim(1). It tries to set the title and hands vim the environment
1147 variable VIM_OPTIONS on the command line. So the user may define command
1148 line options, she always wants, in her .zshrc.local.
1149 <p></p>
1150 </dd>
1151 <dt><b>vman()</b></dt><dd>
1152 Use vim(1) as manpage reader.
1153 <p></p>
1154 </dd>
1155 <dt><b>whatwhen()</b></dt><dd>
1156 Searches the history for a given pattern and lists the results by date.
1157 The first argument is the search pattern. The second and third ones are
1158 optional and denote a search range (default: -100).
1159 <p></p>
1160 </dd>
1161 <dt><b>weather()</b></dt><dd>
1162 Retrieves and prints weather information from "<a href="http://weather.noaa.gov">http://weather.noaa.gov</a>".
1163 The first and only argument is the ICAO code for the desired station.
1164 For a list of ICAO codes see
1165 "<a href="http://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code">http://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code</a>".
1166 <p></p>
1167 </dd>
1168 <dt><b>wikide()</b></dt><dd>
1169 Looks up the argument on Wikipedia (german).
1170 <p></p>
1171 </dd>
1172 <dt><b>wikien()</b></dt><dd>
1173 Looks up the argument on Wikipedia (english).
1174 <p></p>
1175 </dd>
1176 <dt><b>wodeb()</b></dt><dd>
1177 Searches the list of official debian packages for the term given as
1178 first argument. The optional second argument denotes the distribution
1179 (stable, testing or unstable) and defaults to unstable.
1180 <p></p>
1181 </dd>
1182 <dt><b>xcat()</b></dt><dd>
1183 Tries to cat(1) file(s) given as parameter(s). Always returns true.
1184 See also xunfunction() below.
1185 <p></p>
1186 </dd>
1187 <dt><b>xsource()</b></dt><dd>
1188 Tries to source the file(s) given as parameter(s). Always returns true.
1189 See zshbuiltins(1) for a detailed description of the source command.
1190 See also xunfunction() below.
1191 <p></p>
1192 </dd>
1193 <dt><b>xtrename()</b></dt><dd>
1194 Changes the title of xterm window from within screen(1). Run without
1195 arguments for details.
1196 <p></p>
1197 </dd>
1198 <dt><b>xunfunction()</b></dt><dd>
1199 Removes the functions salias, xcat, xsource, xunfunction and zrcautoload.
1200 <p></p>
1201 </dd>
1202 <dt><b>zg()</b></dt><dd>
1203 Search for patterns in grml's zshrc using perl. zg takes no or exactly one
1204 option plus a non empty pattern. Run zg without any arguments for a listing
1205 of available command line switches. For a zshrc not in /etc/zsh, set the
1206 GRML_ZSHRC environment variable.
1207 <p></p>
1208 </dd>
1209 <dt><b>zrcautoload()</b></dt><dd>
1210 Wrapper around the autoload builtin. Loads the definitions of functions
1211 from the file given as argument. Searches $fpath for the file. See also
1212 xunfunction() above.
1213 <p></p>
1214 </dd>
1215 <dt><b>zrclocal()</b></dt><dd>
1216 Sources /etc/zsh/zshrc.local and ${HOME}/.zshrc.local. These are the files
1217 where own modifications should go. See also zshbuiltins(1) for a description
1218 of the source command.
1219 </dd>
1220 </dl>
1221 <h2>ALIASES</h2>
1222 <p>
1223 <i>grmlzshrc</i> comes with a wide array of predefined aliases to ease the user's
1224 life. A few aliases (like those involving <i>grep</i> or <i>ls</i>) use the option
1225 <i>--color=auto</i> for colourizing output. That option is part of <b>GNU</b>
1226 implementations of these tools, and will only be used if such an implementation
1227 is detected.
1228 </p>
1229 <dl>
1230 <dt><b>acp</b> (<i>apt-cache policy</i>)</dt><dd>
1231 With no arguments prints out the priorities of each source. If a package name
1232 is given, it displays detailed information about the priority selection of the
1233 package.
1234 <p></p>
1235 </dd>
1236 <dt><b>acs</b> (<i>apt-cache search</i>)</dt><dd>
1237 Searches debian package lists for the regular expression provided as argument.
1238 The search includes package names and descriptions. Prints out name and short
1239 description of matching packages.
1240 <p></p>
1241 </dd>
1242 <dt><b>acsh</b> (<i>apt-cache show</i>)</dt><dd>
1243 Shows the package records for the packages provided as arguments.
1244 <p></p>
1245 </dd>
1246 <dt><b>adg</b> (<i>apt-get dist-upgrade</i>)</dt><dd>
1247 Performs an upgrade of all installed packages. Also tries to automatically
1248 handle changing dependencies with new versions of packages. As this may change
1249 the install status of (or even remove) installed packages, it is potentially
1250 dangerous to use dist-upgrade; invoked by sudo, if necessary.
1251 <p></p>
1252 </dd>
1253 <dt><b>ag</b> (<i>apt-get upgrade</i>)</dt><dd>
1254 Downloads and installs the newest versions of all packages currently installed
1255 on the system. Under no circumstances are currently installed packages removed,
1256 or packages not already installed retrieved and installed. New versions of
1257 currently installed packages that cannot be upgraded without changing the install
1258 status of another package will be left at their current version. An update must
1259 be performed first (see au below); run by sudo, if necessary.
1260 <p></p>
1261 </dd>
1262 <dt><b>agi</b> (<i>apt-get install</i>)</dt><dd>
1263 Downloads and installs or upgrades the packages given on the command line.
1264 If a hyphen is appended to the package name, the identified package will be
1265 removed if it is installed. Similarly a plus sign can be used to designate a
1266 package to install. This may be useful to override decisions made by apt-get's
1267 conflict resolution system.
1268 A specific version of a package can be selected for installation by following
1269 the package name with an equals and the version of the package to select. This
1270 will cause that version to be located and selected for install. Alternatively a
1271 specific distribution can be selected by following the package name with a slash
1272 and the version of the distribution or the Archive name (stable, testing, unstable).
1273 Gets invoked by sudo, if user id is not 0.
1274 <p></p>
1275 </dd>
1276 <dt><b>ati</b> (<i>aptitude install</i>)</dt><dd>
1277 Aptitude is a terminal-based package manager with a command line mode similar to
1278 apt-get (see agi above); invoked by sudo, if necessary.
1279 <p></p>
1280 </dd>
1281 <dt><b>au</b> (<i>apt-get update</i>)</dt><dd>
1282 Resynchronizes the package index files from their sources. The indexes of
1283 available packages are fetched from the location(s) specified in
1284 /etc/apt/sources.list. An update should always be performed before an
1285 upgrade or dist-upgrade; run by sudo, if necessary.
1286 <p></p>
1287 </dd>
1288 <dt><b>calc</b> (<i>peval</i>)</dt><dd>
1289 Evaluates a perl expression (see peval() above); useful as a command line
1290 calculator.
1291 <p></p>
1292 </dd>
1293 <dt><b>CH</b> (<i>./configure --help</i>)</dt><dd>
1294 Lists available compilation options for building program from source.
1295 <p></p>
1296 </dd>
1297 <dt><b>cmplayer</b> (<i>mplayer -vo fbdev</i>)</dt><dd>
1298 Video player with framebuffer as video output device, so you can watch
1299 videos on a virtual tty. Hint: Using fbdev2 allows you to use the shell
1300 while watching a movie.
1301 <p></p>
1302 </dd>
1303 <dt><b>CO</b> (<i>./configure</i>)</dt><dd>
1304 Prepares compilation for building program from source.
1305 <p></p>
1306 </dd>
1307 <dt><b>cp</b> (<i>nocorrect cp</i>)</dt><dd>
1308 cp(1) without spelling correction.
1309 <p></p>
1310 </dd>
1311 <dt><b>da</b> (<i>du -sch</i>)</dt><dd>
1312 Prints the summarized disk usage of the arguments as well as a grand total
1313 in human readable format.
1314 <p></p>
1315 </dd>
1316 <dt><b>dbp</b> (<i>dpkg-buildpackage</i>)</dt><dd>
1317 Builds binary or source packages from sources (See: dpkg-buildpackage(1)).
1318 <p></p>
1319 </dd>
1320 <dt><b>debs-by-size</b> (<i>grep-status -FStatus -sInstalled-Size,Package -n "install ok installed" | paste -sd "  \n" | sort -rn</i>)</dt><dd>
1321 Prints installed Packages sorted by size (descending).
1322 <p></p>
1323 </dd>
1324 <dt><b>default</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1325 Sets font of xterm to "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-15"
1326 using escape sequence.
1327 <p></p>
1328 </dd>
1329 <dt><b>dir</b> (<i>ls -lSrah</i>)</dt><dd>
1330 Lists files (including dot files) sorted by size (biggest last) in long and
1331 human readable output format.
1332 <p></p>
1333 </dd>
1334 <dt><b>fblinks</b> (<i>links2 -driver fb</i>)</dt><dd>
1335 A Web browser on the framebuffer device. So you can browse images and click
1336 links on the virtual tty.
1337 <p></p>
1338 </dd>
1339 <dt><b>fbmplayer</b> (<i>mplayer -vo fbdev -fs -zoom</i>)</dt><dd>
1340 Fullscreen Video player with the framebuffer as video output device. So you
1341 can watch videos on a virtual tty.
1342 <p></p>
1343 </dd>
1344 <dt><b>g</b> (<i>git</i>)</dt><dd>
1345 Revision control system by Linus Torvalds.
1346 <p></p>
1347 </dd>
1348 <dt><b>ge</b> (<i>grep-excuses</i>)</dt><dd>
1349 Searches the testing excuses files for a specific maintainer (See:
1350 grep-excuses(1)).
1351 <p></p>
1352 </dd>
1353 <dt><b>grep</b> (<i>grep --color=auto</i>)</dt><dd>
1354 Shows grep output in nice colors, if available.
1355 <p></p>
1356 </dd>
1357 <dt><b>GREP</b> (<i>grep -i --color=auto</i>)</dt><dd>
1358 Case insensitive grep with colored output.
1359 <p></p>
1360 </dd>
1361 <dt><b>grml-rebuildfstab</b> (<i>rebuildfstab -v -r -config</i>)</dt><dd>
1362 Scans for new devices and updates /etc/fstab according to the findings.
1363 <p></p>
1364 </dd>
1365 <dt><b>grml-version</b> (<i>cat /etc/grml_version</i>)</dt><dd>
1366 Prints version of running grml.
1367 <p></p>
1368 </dd>
1369 <dt><b>hbp</b> (<i>hg-buildpackage</i>)</dt><dd>
1370 Helper program to maintain Debian packages with mercurial.
1371 <p></p>
1372 </dd>
1373 <dt><b>http</b> (<i>python -m SimpleHTTPServer</i>)</dt><dd>
1374 Basic HTTP server implemented in python. Listens on port 8000/tcp and
1375 serves current directory. Implements GET and HEAD methods.
1376 <p></p>
1377 </dd>
1378 <dt><b>insecscp</b> (<i>scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"</i>)</dt><dd>
1379 scp with possible man-in-the-middle attack enabled. This is convenient, if the targets
1380 host key changes frequently, for example on virtualized test- or development-systems.
1381 To be used only inside trusted networks, of course.
1382 <p></p>
1383 </dd>
1384 <dt><b>insecssh</b> (<i>ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"</i>)</dt><dd>
1385 ssh with possible man-in-the-middle attack enabled
1386 (for an explanation see insecscp above).
1387 <p></p>
1388 </dd>
1389 <dt><b>help-zshglob</b> (<i>H-Glob()</i>)</dt><dd>
1390 Runs the function H-Glob() to expand or explain wildcards.
1391 <p></p>
1392 </dd>
1393 <dt><b>hide</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1394 Tries to hide xterm window using escape sequence.
1395 <p></p>
1396 </dd>
1397 <dt><b>hidiff</b> (<i>histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'</i>)</dt><dd>
1398 If histring(1) is installed, highlight important stuff in diff(1) output.
1399 <p></p>
1400 </dd>
1401 <dt><b>huge</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1402 Sets huge font in xterm ("-misc-fixed-medium-r-normal-*-*-210-*-*-c-*-iso8859-15")
1403 using escape sequence.
1404 <p></p>
1405 </dd>
1406 <dt><b>j</b> (<i>jobs -l</i>)</dt><dd>
1407 Prints status of jobs in the current shell session in long format.
1408 <p></p>
1409 </dd>
1410 <dt><b>l</b> (<i>ls -lF --color=auto</i>)</dt><dd>
1411 Lists files in long output format with indicator for filetype appended
1412 to filename. If the terminal supports it, with colored output.
1413 <p></p>
1414 </dd>
1415 <dt><b>la</b> (<i>ls -la --color=auto</i>)</dt><dd>
1416 Lists files in long colored output format. Including file names
1417 starting with ".".
1418 <p></p>
1419 </dd>
1420 <dt><b>lad</b> (<i>ls -d .*(/)</i>)</dt><dd>
1421 Lists the dot directories (not their contents) in current directory.
1422 <p></p>
1423 </dd>
1424 <dt><b>large</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1425 Sets large font in xterm ("-misc-fixed-medium-r-normal-*-*-150-*-*-c-*-iso8859-15")
1426 using escape sequence.
1427 <p></p>
1428 </dd>
1429 <dt><b>lh</b> (<i>ls -hAl --color=auto</i>)</dt><dd>
1430 Lists files in long and human readable output format in nice colors,
1431 if available. Includes file names starting with "." except "." and
1432 "..".
1433 <p></p>
1434 </dd>
1435 <dt><b>ll</b> (<i>ls -l --color=auto</i>)</dt><dd>
1436 Lists files in long colored output format.
1437 <p></p>
1438 </dd>
1439 <dt><b>llog</b> (<i>$PAGER /var/log/syslog</i>)</dt><dd>
1440 Opens syslog in pager.
1441 <p></p>
1442 </dd>
1443 <dt><b>ls</b> (<i>ls -b -CF --color=auto</i>)</dt><dd>
1444 Lists directory printing octal escapes for nongraphic characters.
1445 Entries are listed by columns and an indicator for file type is appended
1446 to each file name. Additionally the output is colored, if the terminal
1447 supports it.
1448 <p></p>
1449 </dd>
1450 <dt><b>lsa</b> (<i>ls -a .*(.)</i>)</dt><dd>
1451 Lists dot files in current working directory.
1452 <p></p>
1453 </dd>
1454 <dt><b>lsbig</b> (<i>ls -flh *(.OL[1,10])</i>)</dt><dd>
1455 Displays the ten biggest files (long and human readable output format).
1456 <p></p>
1457 </dd>
1458 <dt><b>lsd</b> (<i>ls -d *(/)</i>)</dt><dd>
1459 Shows directories.
1460 <p></p>
1461 </dd>
1462 <dt><b>lse</b> (<i>ls -d *(/^F)</i>)</dt><dd>
1463 Shows empty directories.
1464 <p></p>
1465 </dd>
1466 <dt><b>lsl</b> (<i>ls -l *(@)</i>)</dt><dd>
1467 Lists symbolic links in current directory.
1468 <p></p>
1469 </dd>
1470 <dt><b>lsnew</b> (<i>ls -rl *(D.om[1,10])</i>)</dt><dd>
1471 Displays the ten newest files (long output format).
1472 <p></p>
1473 </dd>
1474 <dt><b>lsold</b> (<i>ls -rtlh *(D.om[1,10])</i>)</dt><dd>
1475 Displays the ten oldest files (long output format).
1476 <p></p>
1477 </dd>
1478 <dt><b>lss</b> (<i>ls -l *(s,S,t)</i>)</dt><dd>
1479 Lists files in current directory that have the setuid, setgid or sticky bit
1480 set.
1481 <p></p>
1482 </dd>
1483 <dt><b>lssmall</b> (<i>ls -Srl *(.oL[1,10])</i>)</dt><dd>
1484 Displays the ten smallest files (long output format).
1485 <p></p>
1486 </dd>
1487 <dt><b>lsw</b> (<i>ls -ld *(R,W,X.^ND/)</i>)</dt><dd>
1488 Displays all files which are world readable and/or world writable and/or
1489 world executable (long output format).
1490 <p></p>
1491 </dd>
1492 <dt><b>lsx</b> (<i>ls -l *(*)</i>)</dt><dd>
1493 Lists only executable files.
1494 <p></p>
1495 </dd>
1496 <dt><b>md</b> (<i>mkdir -p</i>)</dt><dd>
1497 Creates directory including parent directories, if necessary
1498 <p></p>
1499 </dd>
1500 <dt><b>mdstat</b> (<i>cat /proc/mdstat</i>)</dt><dd>
1501 Lists all active md (i.e. linux software raid) devices with some information
1502 about them.
1503 <p></p>
1504 </dd>
1505 <dt><b>medium</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1506 Sets medium sized font
1507 ("-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-15") in xterm
1508 using escape sequence.
1509 <p></p>
1510 </dd>
1511 <dt><b>mkdir</b> (<i>nocorrect mkdir</i>)</dt><dd>
1512 mkdir(1) without spelling correction.
1513 <p></p>
1514 </dd>
1515 <dt><b>mq</b> (<i>hg -R $(readlink -f $(hg root)/.hg/patches)</i>)</dt><dd>
1516 Executes the commands on the versioned patch queue from current repository.
1517 <p></p>
1518 </dd>
1519 <dt><b>mv</b> (<i>nocorrect mv</i>)</dt><dd>
1520 mv(1) without spelling correction.
1521 <p></p>
1522 </dd>
1523 <dt><b>rd</b> (<i>rmdir</i>)</dt><dd>
1524 Short rmdir(1) (remove directory).
1525 <p></p>
1526 </dd>
1527 <dt><b>rm</b> (<i>nocorrect rm</i>)</dt><dd>
1528 rm(1) without spelling correction.
1529 <p></p>
1530 </dd>
1531 <dt><b>screen</b> (<i>/usr/bin/screen -c ${HOME}/.screenrc</i>)</dt><dd>
1532 If invoking user is root, starts screen session with /etc/grml/screenrc
1533 as config file. If invoked by a regular user, start a screen session
1534 with users .screenrc config if it exists, else use /etc/grml/screenrc_grml
1535 as configuration.
1536 <p></p>
1537 </dd>
1538 <dt><b>rw-</b> (<i>chmod 600</i>)</dt><dd>
1539 Grants read and write permission of a file to the owner and nobody else.
1540 <p></p>
1541 </dd>
1542 <dt><b>rwx</b> (<i>chmod 700</i>)</dt><dd>
1543 Grants read, write and execute permission of a file to the owner and nobody
1544 else.
1545 <p></p>
1546 </dd>
1547 <dt><b>r--</b> (<i>chmod 644</i>)</dt><dd>
1548 Grants read and write permission of a file to the owner and read-only to
1549 anybody else.
1550 <p></p>
1551 </dd>
1552 <dt><b>r-x</b> (<i>chmod 755</i>)</dt><dd>
1553 Grants read, write and execute permission of a file to the owner and
1554 read-only plus execute permission to anybody else.
1555 <p></p>
1556 </dd>
1557 <dt><b>S</b> (<i>screen</i>)</dt><dd>
1558 Short for screen(1).
1559 <p></p>
1560 </dd>
1561 <dt><b>s</b> (<i>ssh</i>)</dt><dd>
1562 Short for ssh(1).
1563 <p></p>
1564 </dd>
1565 <dt><b>semifont</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1566 Sets font of xterm to
1567 "-misc-fixed-medium-r-semicondensed-*-*-120-*-*-*-*-iso8859-15" using
1568 escape sequence.
1569 <p></p>
1570 </dd>
1571 <dt><b>small</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1572 Sets small xterm font ("6x10") using escape sequence.
1573 <p></p>
1574 </dd>
1575 <dt><b>smartfont</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1576 Sets font of xterm to "-artwiz-smoothansi-*-*-*-*-*-*-*-*-*-*-*-*" using
1577 escape sequence.
1578 <p></p>
1579 </dd>
1580 <dt><b>su</b> (<i>sudo su</i>)</dt><dd>
1581 If user is running a grml live-CD, dont ask for any password, if she
1582 wants a root shell.
1583 <p></p>
1584 </dd>
1585 <dt><b>term2iso</b> (<i>echo 'Setting terminal to iso mode' ; print -n '\e%@'</i>)</dt><dd>
1586 Sets mode from UTF-8 to ISO 2022 (See:
1587 <a href="http://www.cl.cam.ac.uk/~mgk25/unicode.html#term">http://www.cl.cam.ac.uk/~mgk25/unicode.html#term</a>).
1588 <p></p>
1589 </dd>
1590 <dt><b>term2utf</b> (<i>echo 'Setting terminal to utf-8 mode'; print -n '\e%G'</i>)</dt><dd>
1591 Sets mode from ISO 2022 to UTF-8 (See:
1592 <a href="http://www.cl.cam.ac.uk/~mgk25/unicode.html#term">http://www.cl.cam.ac.uk/~mgk25/unicode.html#term</a>).
1593 <p></p>
1594 </dd>
1595 <dt><b>tiny</b> (<i>echo -en [ escape sequence ]</i>)</dt><dd>
1596 Sets tiny xterm font
1597 ("-misc-fixed-medium-r-normal-*-*-80-*-*-c-*-iso8859-15") using escape
1598 sequence.
1599 <p></p>
1600 </dd>
1601 <dt><b>tlog</b> (<i>tail -f /var/log/syslog</i>)</dt><dd>
1602 Prints syslog continuously (See tail(1)).
1603 <p></p>
1604 </dd>
1605 <dt><b>top10</b> (<i>print -l ? ${(o)history%% *} | uniq -c | sort -nr | head -n 10</i>)</dt><dd>
1606 Prints the ten most used shell commands.
1607 <p></p>
1608 </dd>
1609 <dt><b>truec</b> (<i>truecrypt [ mount options ]</i>)</dt><dd>
1610 Mount a truecrypt volume with some reasonable mount options
1611 ("rw,sync,dirsync,users,uid=1000,gid=users,umask=077" and "utf8", if
1612 available).
1613 <p></p>
1614 </dd>
1615 <dt><b>up</b> (<i>aptitude update ; aptitude safe-upgrade</i>)</dt><dd>
1616 Performs a system update followed by a system upgrade using aptitude; run
1617 by sudo, if necessary. See au and ag above.
1618 <p></p>
1619 </dd>
1620 <dt><b>url-quote</b> (<i>autoload -U url-quote-magic ; zle -N self-insert url-quote-magic</i>)</dt><dd>
1621 After calling, characters of URLs as typed get automatically escaped, if necessary, to
1622 protect them from the shell.
1623 <p></p>
1624 </dd>
1625 <dt><b>0</b> (<i>return 0</i>)</dt><dd>
1626 Gives a clean prompt (i.e. without $?).
1627 <p></p>
1628 </dd>
1629 <dt><b>$(uname -r)-reboot</b> (<i>kexec -l --initrd=/boot/initrd.img-"$(uname -r)" --command-line=\"$(cat /proc/cmdline)\" /boot/vmlinuz-"$(uname -r)"</i>)</dt><dd>
1630 Reboots using kexec(8) and thus reduces boot time by skipping hardware initialization of BIOS/firmware.
1631 <p></p>
1632 </dd>
1633 <dt><b>...</b> (<i>cd ../../</i>)</dt><dd>
1634 Changes current directory two levels higher.
1635 <p></p>
1636 </dd>
1637 <dt><b>?</b> (<i>qma zshall</i>)</dt><dd>
1638 Runs the grml script qma (quick manual access) to build the collected man
1639 pages for the z-shell. This compressed file is kept at
1640 ~/man/zshall.txt.lzo Once it is built, the second use of the alias '?' is
1641 fast. See "man qma" for further information.
1642 </dd>
1643 </dl>
1644 <h1>AUXILIARY FILES</h1>
1645 <p>
1646 This is a set of files, that - if they exist - can be used to customize the
1647 behaviour of <i>grmlzshrc</i>.
1648 </p>
1649 <dl>
1650 <dt><b>.zshrc.pre</b></dt><dd>
1651 Sourced at the very beginning of <i>grmlzshrc</i>. Among other things, it can
1652 be used to permantenly change <i>grmlzshrc</i>'s STARTUP VARIABLES (see above):
1653
1654 <pre>
1655 # show battery status in RPROMPT
1656 BATTERY=1
1657 # always load the complete setup, even for root
1658 GRML_ALWAYS_LOAD_ALL=1
1659 </pre>
1660 <p></p>
1661 </dd>
1662 <dt><b>.zshrc.local</b></dt><dd>
1663 Sourced right before loading <i>grmlzshrc</i> is finished. There is a global
1664 version of this file (/etc/zsh/zshrc.local) which is sourced before the
1665 user-specific one.
1666 <p></p>
1667 </dd>
1668 <dt><b>.zdirs</b></dt><dd>
1669 Directory listing for persistent dirstack (see above).
1670 <p></p>
1671 </dd>
1672 <dt><b>.important_commands</b></dt><dd>
1673 List of commands, used by persistent history (see above).
1674 </dd>
1675 </dl>
1676 <h1>INSTALLATION ON NON-DEBIAN SYSTEMS</h1>
1677 <p>
1678 On Debian systems (<a href="http://www.debian.org">http://www.debian.org</a>) - and possibly Ubuntu
1679 (<a href="http://www.ubuntu.com">http://www.ubuntu.com</a>) and similar systems - it is very easy to get
1680 <i>grmlzshrc</i> via grml's .deb repositories.
1681 </p>
1682 <p>
1683 On non-debian systems, that is not an option, but all is not lost:
1684
1685 </p>
1686 <pre>
1687 % wget -O .zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
1688 </pre>
1689 <p></p>
1690 <p>
1691 If you would also like to get seperate function files (which you can put into
1692 your <b>$fpath</b>), you can browse and download them at:
1693 </p>
1694 <p>
1695 <a href="http://git.grml.org/?p=grml-etc-core.git;a=tree;f=usr_share_grml/zsh;hb=HEAD">http://git.grml.org/?p=grml-etc-core.git;a=tree;f=usr_share_grml/zsh;hb=HEAD</a>
1696 </p>
1697 <h1>ZSH REFCARD TAGS</h1>
1698 <p>
1699 If you read <i>grmlzshrc</i>'s code you may notice strange looking comments in
1700 it. These are there for a purpose. grml's zsh-refcard is automatically
1701 generated from the contents of the actual configuration file. However, we need
1702 a little extra information on which comments and what lines of code to take
1703 into account (and for what purpose).
1704 </p>
1705 <p>
1706 Here is what they mean:
1707 </p>
1708 <p>
1709 List of tags (comment types) used:
1710 </p>
1711 <dl>
1712 <dt><b>#a#</b></dt><dd>
1713 Next line contains an important alias, that should be included in the
1714 grml-zsh-refcard. (placement tag: @@INSERT-aliases@@)
1715 <p></p>
1716 </dd>
1717 <dt><b>#f#</b></dt><dd>
1718 Next line contains the beginning of an important function. (placement
1719 tag: @@INSERT-functions@@)
1720 <p></p>
1721 </dd>
1722 <dt><b>#v#</b></dt><dd>
1723 Next line contains an important variable. (placement tag:
1724 @@INSERT-variables@@)
1725 <p></p>
1726 </dd>
1727 <dt><b>#k#</b></dt><dd>
1728 Next line contains an important keybinding. (placement tag:
1729 @@INSERT-keybindings@@)
1730 <p></p>
1731 </dd>
1732 <dt><b>#d#</b></dt><dd>
1733 Hashed directories list generation: <i>start</i>: denotes the start of a list of
1734 'hash -d' definitions. <i>end</i>: denotes its end. (placement tag:
1735 @@INSERT-hasheddirs@@)
1736 <p></p>
1737 </dd>
1738 <dt><b>#A#</b></dt><dd>
1739 Abbreviation expansion list generation: <i>start</i>: denotes the beginning of
1740 abbreviations. <i>end</i>: denotes their end.
1741
1742 Lines within this section that end in '#d .*' provide extra documentation to
1743 be included in the refcard. (placement tag: @@INSERT-abbrev@@)
1744 <p></p>
1745 </dd>
1746 <dt><b>#m#</b></dt><dd>
1747 This tag allows you to manually generate refcard entries for code lines that
1748 are hard/impossible to parse.
1749 Example:
1750
1751 <pre>
1752 #m# k ESC-h Call the run-help function
1753 </pre>
1754
1755 That would add a refcard entry in the keybindings table for 'ESC-h' with the
1756 given comment.
1757
1758 So the syntax is: #m# &lt;section&gt; &lt;argument&gt; &lt;comment&gt;
1759 <p></p>
1760 </dd>
1761 <dt><b>#o#</b></dt><dd>
1762 This tag lets you insert entries to the 'other' hash. Generally, this should
1763 not be used. It is there for things that cannot be done easily in another way.
1764 (placement tag: @@INSERT-other-foobar@@)
1765 </dd>
1766 </dl>
1767 <p>
1768 All of these tags (except for m and o) take two arguments, the first
1769 within the tag, the other after the tag:
1770 </p>
1771 <p>
1772 #&lt;tag&gt;&lt;section&gt;# &lt;comment&gt;
1773 </p>
1774 <p>
1775 Where &lt;section&gt; is really just a number, which are defined by the @secmap
1776 array on top of 'genrefcard.pl'. The reason for numbers instead of names is,
1777 that for the reader, the tag should not differ much from a regular comment.
1778 For zsh, it is a regular comment indeed. The numbers have got the following
1779 meanings:
1780 </p>
1781 <dl>
1782 <dt><b>0</b></dt><dd>
1783 <i>default</i>
1784 <p></p>
1785 </dd>
1786 <dt><b>1</b></dt><dd>
1787 <i>system</i>
1788 <p></p>
1789 </dd>
1790 <dt><b>2</b></dt><dd>
1791 <i>user</i>
1792 <p></p>
1793 </dd>
1794 <dt><b>3</b></dt><dd>
1795 <i>debian</i>
1796 <p></p>
1797 </dd>
1798 <dt><b>4</b></dt><dd>
1799 <i>search</i>
1800 <p></p>
1801 </dd>
1802 <dt><b>5</b></dt><dd>
1803 <i>shortcuts</i>
1804 <p></p>
1805 </dd>
1806 <dt><b>6</b></dt><dd>
1807 <i>services</i>
1808 </dd>
1809 </dl>
1810 <p>
1811 So, the following will add an entry to the 'functions' table in the 'system'
1812 section, with a (hopefully) descriptive comment:
1813
1814 </p>
1815 <pre>
1816 #f1# Edit an alias via zle
1817 edalias() {
1818 </pre>
1819 <p>
1820
1821 It will then show up in the @@INSERT-aliases-system@@ replacement tag that can
1822 be found in 'grml-zsh-refcard.tex.in'. If the section number is omitted, the
1823 'default' section is assumed. Furthermore, in 'grml-zsh-refcard.tex.in'
1824 @@INSERT-aliases@@ is exactly the same as @@INSERT-aliases-default@@. If you
1825 want a list of <b>all</b> aliases, for example, use @@INSERT-aliases-all@@.
1826 </p>
1827 <h1>CONTRIBUTING</h1>
1828 <p>
1829 If you want to help to improve grml's zsh setup, clone the grml-etc-core
1830 repository from git.grml.org:
1831
1832 </p>
1833 <pre>
1834 % git clone git://git.grml.org/grml-etc-core.git
1835 </pre>
1836 <p></p>
1837 <p>
1838 Make your changes, commit them; use '<b>git format-patch</b>' to create a series
1839 of patches and send those to the following address via '<b>git send-email</b>':
1840
1841 </p>
1842 <pre>
1843 grml-etc-core@grml.org
1844 </pre>
1845 <p></p>
1846 <p>
1847 Doing so makes sure the right people get your patches for review and
1848 possibly inclusion.
1849 </p>
1850 <h1>STATUS</h1>
1851 <p>
1852 This manual page is the <b>reference</b> manual for <i>grmlzshrc</i>.
1853 </p>
1854 <p>
1855 That means that in contrast to the existing refcard it should document <b>every</b>
1856 aspect of the setup.
1857 </p>
1858 <p>
1859 This manual is currently not complete. If you want to help improving it, visit
1860 the following pages:
1861 </p>
1862 <p>
1863 <a href="http://wiki.grml.org/doku.php?id=zshrcmanual">http://wiki.grml.org/doku.php?id=zshrcmanual</a>
1864 </p>
1865 <p>
1866 <a href="http://lists.mur.at/pipermail/grml/2009-August/004609.html">http://lists.mur.at/pipermail/grml/2009-August/004609.html</a>
1867 </p>
1868 <p>
1869 Contributions are highly welcome.
1870 </p>
1871 <h1>AUTHORS</h1>
1872 <p>
1873 This manpage was written by Frank Terbeck &lt;<a href="mailto:ft@grml.org">ft@grml.org</a>&gt;, Joerg Woelke
1874 &lt;<a href="mailto:joewoe@fsmail.de">joewoe@fsmail.de</a>&gt;, Maurice McCarthy &lt;<a href="mailto:manselton@googlemail.com">manselton@googlemail.com</a>&gt; and Axel
1875 Beckert &lt;<a href="mailto:abe@deuxchevaux.org">abe@deuxchevaux.org</a>&gt;.
1876 </p>
1877 <h1>COPYRIGHT</h1>
1878 <p>
1879 Copyright (c) 2009-2010 grml project &lt;<a href="http://grml.org">http://grml.org</a>&gt;
1880 </p>
1881 <p>
1882 This manpage is distributed under the terms of the GPL version 2.
1883 </p>
1884 <p>
1885 Most parts of grml's zshrc are distributed under the terms of GPL v2, too,
1886 except for <b>accept-line()</b> and <b>vcs_info()</b>, which are distributed under
1887 the same conditions as zsh itself (which is BSD-like).
1888 </p>
1889 </div>
1890 <!-- xhtml code generated by txt2tags 2.5 (http://txt2tags.sf.net) -->
1891 <!-- cmdline: txt2tags -\-target xhtml -\-css-sugar -\-style t2t-modern.css -o- grmlzshrc.t2t -->
1892 </body></html>