1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
5 <TITLE>grml - Linux for system administrators and texttool users: texttool-users tasks</TITLE>
6 <LINK HREF="grml-doc-4.html" REL=next>
7 <LINK HREF="grml-doc-2.html" REL=previous>
8 <LINK HREF="grml-doc.html#toc3" REL=contents>
11 <A HREF="grml-doc-4.html">Next</A>
12 <A HREF="grml-doc-2.html">Previous</A>
13 <A HREF="grml-doc.html#toc3">Contents</A>
15 <H2><A NAME="s3">3.</A> <A HREF="grml-doc.html#toc3">texttool-users tasks</A></H2>
17 <H2><A NAME="zsh"></A> <A NAME="ss3.1">3.1</A> <A HREF="grml-doc.html#toc3.1">exploring the zsh</A>
22 <P>The default shell of grml is the zsh. You'll find a preconfigured zsh.
23 Main configuration of zsh is located in /etc/zsh/. This documentation
24 covers current version of zsh (>=4.2).</P>
26 <H3>completition system</H3>
28 <P>You'll get a zsh with the completition mechanism. grml system loads the
29 completion mechanism by default:</P>
34 autoload -U compinit && compinit
35 zmodload -i zsh/complist
40 <P>Now it is possible to use the powerful completition mechanism of zsh.
41 For example file completition is something you might know from other shells:</P>
46 mika@grml /tmp/mplayer-1.0-pre4 % vim debian/cont<press tab>
51 <P>But zsh can provide completition also by detecting the context:
55 mika@grml ~ % ssh grml@<press tab>
62 <P>And it's possible to extend and adjust the completition mechanism.
63 Take a look at the Makefile-completition:</P>
68 mika@grml /tmp/mplayer-1.0-pre4 % debian/rules <press tab>
69 completing make target
70 binary binary-indep build-stamp configure install patch-stamp
71 binary-arch build clean configure-stamp patch unpatch
76 <P>The following listing is the output provided by running 'bindkey' on zsh
77 configuration on the grml system. Notice that the sequence '^[' in bindkey
78 commands refers to the escape key. '^' refers to the control key. '^A' is
79 the short form for ctrl-a. Take a closer look at it because using
80 keybindings for special task is a very important step to become a poweruser
81 on the command line.</P>
87 "^A" beginning-of-line
89 "^D" delete-char-or-list
93 "^H" backward-delete-char
94 "^I" expand-or-complete
99 "^N" down-line-or-history
100 "^O" accept-line-and-down-history
101 "^P" up-line-or-history
103 "^R" history-incremental-search-backward
104 "^S" history-incremental-search-forward
108 "^W" backward-kill-word
109 "^X^B" vi-match-bracket
110 "^X^F" vi-find-next-char
113 "^X^N" infer-next-history
114 "^X^O" overwrite-mode
118 "^X^X" exchange-point-and-mark
121 "^X=" what-cursor-position
122 "^X?" _complete_debug
123 "^XC" _correct_filename
125 "^XK" expand-kept-result
128 "^Xd" _list_expansions
132 "^Xk" insert-kept-result
133 "^Xm" _most_recent_file
135 "^Xr" history-incremental-search-backward
136 "^Xs" history-incremental-search-forward
139 "^X~" _bash_list-choices
144 "^[^H" backward-kill-word
145 "^[^I" self-insert-unmeta
146 "^[^J" self-insert-unmeta
148 "^[^M" self-insert-unmeta
149 "^[^_" copy-prev-word
155 "^[," _history-complete-newer
157 "^[." insert-last-word
158 "^[/" _history-complete-older
169 "^[<" beginning-of-buffer-or-history
170 "^[>" end-of-buffer-or-history
172 "^[A" accept-and-hold
174 "^[C" capitalize-word
180 "^[N" history-search-forward
181 "^[OA" up-line-or-history
182 "^[OB" down-line-or-history
185 "^[P" history-search-backward
188 "^[T" transpose-words
190 "^[W" copy-region-as-kill
191 "^[[1~" beginning-of-line
194 "^[[A" up-line-or-search
195 "^[[B" down-line-or-search
198 "^[_" insert-last-word
199 "^[a" accept-and-hold
201 "^[c" capitalize-word
203 "^[e" edit-command-line
208 "^[n" history-search-forward
209 "^[p" history-search-backward
212 "^[t" transpose-words
214 "^[w" copy-region-as-kill
215 "^[x" execute-named-cmd
217 "^[z" execute-last-named-cmd
219 "^[~" _bash_complete-word
220 "^[^?" backward-kill-word
223 "^?" backward-delete-char
224 "\M-^@"-"\M-^?" self-insert
229 <P>zsh supports many options (see 'man 1 zshoptions' for more details).
230 To get the current settings run the command 'setopt' without any options.
231 On the grml system you'll find the following options set:</P>
235 <DT><B>append_history</B><DD><P>If this is set, zsh sessions will append their history
236 list to the history file, rather than overwrite it. Thus, multiple parallel
237 zsh sessions will all have their history lists added to the history file,
238 in the order they are killed.</P>
240 <DT><B>autocd</B><DD><P>If a command is issued that can't be executed as a normal
241 command, and the command is the name of a directory, perform the cd command
242 to that directory.</P>
244 <DT><B>noclobber</B><DD><P>Does not allow `>' redirection to truncate existing files,
245 and `>>' to create files. You must use `>!' or `>|' to truncate a file, and
246 `>>!' or `>>|' to create a file. This options is prevents files from being
247 deleted by accident.</P>
249 <DT><B>correct</B><DD><P>Try to correct the spelling of commands. Note that, when the
250 HASH_LIST_ALL option is not set or when some directories in the path are
251 not readable, this may falsely report spelling errors the first time some
252 commands are used.</P>
254 <DT><B>extendedglob</B><DD><P>Treat the `#', ` ' and `^' characters as part of
255 patterns for filename generation, etc. (An initial unquoted ` ' always
256 produces named directory expansion.)</P>
258 <DT><B>extendedhistory</B><DD><P>Save each command's beginning timestamp (in seconds
259 since the epoch) and the duration (in seconds) to the history file.</P>
261 <DT><B>hash_list_all</B><DD><P>Whenever a command completion is attempted, make sure
262 the entire command path is hashed first. This makes the first completion
265 <DT><B>histallowclobber</B><DD><P>Add `|' to output redirections in the history. This
266 allows history references to clobber files even when CLOBBER is unset.</P>
268 <DT><B>histignorealldups</B><DD><P>If a new command line being added to the history
269 list duplicates an older one, the older command is removed from the list
270 (even if it is not the previous event).</P>
272 <DT><B>histignorespace</B><DD><P>Remove command lines from the history list when the
273 first character on the line is a space, or when one of the expanded aliases
274 contains a leading space. Note that the command lingers in the internal
275 history until the next command is entered before it vanishes, allowing you
276 to briefly reuse or edit the line. If you want to make it vanish right away
277 without entering another command, type a space and press return.</P>
279 <DT><B>interactive</B><DD><P>This is an interactive shell. This option is set upon
280 initialisation if the standard input is a tty and commands are being read
281 from standard input. (See the discussion of SHIN_STDIN.) This heuristic may
282 be overridden by specifying a state for this option on the command line.
283 The value of this option cannot be changed anywhere other than the command
286 <DT><B>monitor</B><DD><P>Allow job control. Set by default in interactive shells.</P>
288 <DT><B>notify</B><DD><P>Report the status of background jobs immediately, rather than
289 waiting until just before printing a prompt.</P>
291 <DT><B>promptsubst</B><DD><P>If set, parameter expansion, command substitution and
292 arithmetic expansion are performed in prompts. Substitutions within prompts
293 do not affect the command status.</P>
295 <DT><B>norcs</B><DD><P>After /etc/zshenv is sourced on startup, source the .zshenv,
296 /etc/zprofile, .zprofile, /etc/zshrc, .zshrc, /etc/zlogin, .zlogin, and
297 .zlogout files, as described in the section `Files'. If this option is
298 unset, the /etc/zshenv file is still sourced, but any of the others will
299 not be; it can be set at any time to prevent the remaining startup files
300 after the currently executing one from being sourced.</P>
302 <DT><B>sharehistory</B><DD><P>This option both imports new commands from the history
303 file, and also causes your typed commands to be appended to the history
304 file. If you find that you want more control over when commands get
305 imported, you may wish to turn SHARE_HISTORY off, INC_APPEND_HISTORY on,
306 and then manually import commands whenever you need them using `fc -RI'.</P>
308 <DT><B>shinstdin</B><DD><P>Commands are being read from the standard input. Commands
309 are read from standard input if no command is specified with -c and no file
310 of commands is specified. If SHIN_STDIN is set explicitly on the command
311 line, any argument that would otherwise have been taken as a file to run
312 will instead be treated as a normal positional parameter. Note that setting
313 or unsetting this option on the command line does not necessarily affect
314 the state the option will have while the shell is running - that is purely
315 an indicator of whether on not commands are actually being read from
316 standard input. The value of this option cannot be changed anywhere other
317 than the command line.</P>
319 <DT><B>zle</B><DD><P>Use the zsh line editor. Set by default in interactive shells
320 connected to a terminal.</P>
325 <H2><A NAME="ss3.2">3.2</A> <A HREF="grml-doc.html#toc3.2">powerusing without X</A>
330 <P>See section zsh for more details.</P>
349 <A HREF="grml-doc-4.html">Next</A>
350 <A HREF="grml-doc-2.html">Previous</A>
351 <A HREF="grml-doc.html#toc3">Contents</A>