grml-zsh-refcard.tex.in: update copyright information
[grml-gen-zshrefcard.git] / grml-zsh-refcard.tex.in
1 % This file is free software: you can redistribute it and/or modify
2 % it under the terms of the GNU General Public License as published by
3 % the Free Software Foundation, either version 3 of the License, or
4 % (at your option) any later version.
5 %
6 % This file is distributed in the hope that it will be useful,
7 % but WITHOUT ANY WARRANTY; without even the implied warranty of
8 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 % GNU General Public License for more details.
10
11 \documentclass[8pt,             % 8pt
12                a4paper,         % A4
13                oneside,         % Einseitig
14                DIV20,           % Papiergröße
15              % DIV15,           % Größer
16              % draft,           % Entwurf
17                headsepline,     % Trennlinie oben
18                footsepline,     % -""-       unten
19                smallheadings,   % Kleine Überschriften
20              % pointlessnumbers,% Keine Punkte
21                halfparskip,     % Halbe Zeile Absatz statt Einzug
22                nochapterprefix, % Kein "Kapitel"
23              % bibtotoc         % "Literatur" im TOC  oder
24              % bibtotocnumbered,% -""-, nummeriert
25              % idxtotoc,        % Index im TOC
26                twocolumn
27               ]{scrartcl}
28
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 %%% Pakete {{{
31 \usepackage[latin1]{inputenc}       % ISO-Umlaute
32 \usepackage[T1]{fontenc}            % T1-kodierte Fonts
33 \usepackage{ae,aecompl}             % Kodierung für PDF
34 %\usepackage{ngerman}                % Deutsche Trennungen,
35                                     % dt. Begriffe
36 \usepackage{setspace}               % Single- oder Onehalfspacing
37 %\setcounter{tocdepth}{4}            % 4 Hirarchien im Inhaltsv.
38 \usepackage{times}                  % Times als Schrift
39 \usepackage{amsmath,amssymb,amstext}% Mathematische Symbole
40 \usepackage{url}                    % Darstellung von URLs
41 \usepackage{calc}
42
43 %%% Optional, je nach Dokument
44 % \usepackage{listings}             % Quelltext-Listings
45 % \usepackage{units}                % Technische Units
46 % \usepackage{psfrag}               % Ersetzts PS-Schriften
47 % \usepackage{color}                % Farben in LaTeX
48 % \usepackage{floatflt}             % Textumflossene Bilder...
49 % \usepackage{picins}               % Textumflossene Bilder
50 % \usepackage{textcomp}             % Spezielle Zeichen
51 % \usepackage[small,compact]{titlesec}             % Überschriften mit wenig Platz
52 % \usepackage{gensymb}              % Spezielle Zeichen
53 % \usepackage{eurosym}              % Euro-Symbol
54
55 %%% Layout
56 \usepackage{scrpage2}               % KOMA-Überschriften und -Fußzeilen.
57 %%% }}}
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59
60 \usepackage[pdftex]{graphicx}
61 \DeclareGraphicsExtensions{.pdf}
62 \pdfcompresslevel=9
63 \usepackage[%
64   pdftex=true,
65   backref=true,
66   colorlinks=true,
67   bookmarks=true,
68   breaklinks=true,
69   linktocpage=true,
70   bookmarksopen=false,
71   bookmarksnumbered=false,
72   pdfpagemode=None
73 ]{hyperref}
74 %%% }}}
75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
77 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78 %%% Eigene Funktionen {{{
79 %%% Beispiel:  \bild{200pt}{foo}{That's a foo\ldots}
80 \newcommand{\bild}[3]{
81   \begin{figure}
82     \includegraphics[width=#1, keepaspectratio=true]{#2}
83     \caption{#3}
84     \label{#2}
85   \end{figure}
86 }
87
88 \newcommand{\kbd}[1]{\texttt{#1}}
89 \newcommand{\commandlistbegin}{
90   \vspace{3pt}
91   \begin{tabular}{ll}
92 }
93 \newcommand{\commandlistend}{
94   \end{tabular}
95 }
96 \newcommand{\command}[2]{
97   \texttt{#1} & \quad #2 \\
98 }
99
100 %%% }}}
101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104 %%% Pagestyle {{{
105   \pagestyle{scrheadings}
106 % \pagestyle{fancyhdrs}
107 % \pagestyle{empty}
108 %%% }}}
109 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 %%% Seitenkopf- und -Fußzeilen {{{
113  \automark[subsection*]{section} % \left- und \rightmark bekommen Inhalt
114 %%% Oben: Links, Mitte, Rechts
115  \ihead[]{{\Huge Grml-Zsh-Refcard}}
116  \chead[]{}
117  \ohead[]{Generated: \today}
118 %%% Unten: Links, Mitte, Rechts
119  \ifoot[]{\vspace{-3pt}Grml-Zsh-Refcard}
120  \cfoot[]{}
121  \ofoot[]{\vspace{-3pt}\copyright 2005-2018 \href{mailto:julius@grml.org}{Julius Plenz},
122  \href{mailto:mika@grml.org}{Michael Prokop} and
123  \href{mailto:ft@grml.org}{Frank Terbeck}}
124 %%% }}}
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126
127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
128 %%% Sonstiges {{{
129 % \setlength{\parindent}{17pt}      % Einzug 17pt,
130 % \setlength{\parskip}{2pt}         % keine Leerzeilen.
131
132 % \textwidth      127mm             % Textbreite
133 % \textheight     235mm             % Texthöhe
134 % \topmargin     -5mm               % Abstand oben
135 % \oddsidemargin  7mm               % Abstand Links, onepage
136
137 %\onehalfspacing                    % Zeilenabstand: Bei korrektur,
138  \singlespacing                     % bei Abgabe
139
140 % Punkt- und Komma Abstände bei Tausendern/
141 % Dezimalzahlen ans deutsche anpassen!
142  \mathcode`,="013B
143  \mathcode`.="613A
144
145  \setlength{\emergencystretch}{2em} % Notfallsstreckung
146 %%% }}}
147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148
149 \addtolength{\voffset}{10pt}
150 \renewcommand{\figurename}{Abb.}
151 \begin{document}
152
153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 %%% Titelseite {{{
155 %\pagenumbering{none}                % Für die Titelseite: Keine Seitennummern,
156 %\thispagestyle{empty}               % keine Kopf- und Fußzeilen.
157 %
158 %\begin{center}
159 %
160 %\end{center}
161 %\newpage
162 %
163 %%% }}}
164 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165
166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167 %%% Inhaltsverzeichnis {{{
168   \pagenumbering{arabic}            % Arabische Nummerierung
169 % \pagenumbering{roman}             % Kleine, römische Nummerierung
170 % \tableofcontents                  % Das Inhaltsverzeichnis
171 % \listoffigures                    % Verzeichnis aller Abbildungen
172 % \listoftables                     % Verzeichnis aller Tabellen
173 % \pagenumbering{arabic}            % ...und wieder Arabisch
174 % \newpage
175 %%% }}}
176 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
177
178 % we won't be using math mode much, so redefine some of the characters
179 % we might want to talk about
180 \catcode`\^=12
181 \catcode`\_=12
182
183 \chardef\\=`\\
184 \chardef\{=`\{
185 \chardef\}=`\}
186
187 \parskip=0pt
188 \setlength{\tabcolsep}{0pt}
189
190 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191 %%% Inhalt {{{
192
193 %Schon in lhead
194 %\section{Grml's Zsh-Setup Reference Card}
195
196 \subsection*{Configuration files}
197
198 \small{Grml's zsh configuration is located in \textbf{/etc/zsh/zshrc}. Please
199 note that some functions/aliases are not active by default for user root
200 (referred to as '... for user (grml)' below) for of security reasons.
201 If you want your root user to use the full setup on your box, put
202 \textbf{GRML\_ALWAYS\_LOAD\_ALL=1} into root's \kbd{\~}/.zshrc.pre.
203 Some aliases/functions are not activated if the appropriate executable
204 isn't present on your system, either.
205
206 You can adjust the grml setup globally to your systems via a file
207 named /etc/zsh/zshrc.local, which is not under the control of Debian package
208 management.
209
210 Put important commands which you need on a regular basis into a file named
211 \textbf{\kbd{\~}/.important\_commands}.
212
213 You can put personal configuration for a user into a file named
214 \textbf{\kbd{\~}/.zshrc.local}. Changes you need to have sourced
215 \textbf{before} the grml zsh setup is loaded can be put into
216 \textbf{\kbd{\~}/.zshrc.pre}.
217
218 More information regarding configuration files and some environment
219 variables to adjust runtime behaviour of grml's zsh can be accessed by
220 running \textbf{zsh-help}.
221
222 \subsection*{Using grml's zsh configuration on a non-grml system}
223
224 You do not have to use grml/Debian to use grml's zsh configuration.
225 Just retrieve and install the configuration files in your home directory.
226 You can do this by running:
227
228 \begin{tiny}
229 \begin{verbatim}
230 wget -O .zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
231 \end{verbatim}
232 \end{tiny}
233
234 This is \textbf{different} from earlier versions of grml's zsh setup.
235 You only use the zshrc file from /etc/zsh/ \textbf{not} the .zshrc file
236 from /etc/skel/ these days. You can remove \kbd{\~}/.zshrc.global if it is
237 still present in your home directory.
238
239 \subsection*{Problems?}
240
241 Please report any problems you encounter while using the grml zsh
242 configuration to the grml team. The configuration has been tested on several
243 Linux distributions (Debian, Gentoo, SuSE, etc) and non-Linux systems as well
244 (FreeBSD, Solaris, AIX, etc), but there might be issues, anyway.
245 \href{http://grml.org/bugs/}{Report them, please!}
246
247 \subsection*{Settings}
248
249 If not already defined, these variables are set to the following
250 values:
251
252 \commandlistbegin
253 @@INSERT-variables@@
254 \commandlistend
255
256 \subsection*{Keybindings}
257
258 Default keybinding mode is Emacs, i.e. you can use Emacs keybinds like
259 \kbd{^A {\rm or} ^E} on the command line. However, you can switch to vi
260 mode.
261
262 \commandlistbegin
263 \command{setopt emacs}{Switch to Emacs mode (default)}
264 \command{setopt vi}{Switch to vi mode}
265 \commandlistend
266
267 \vspace{8pt}
268 The following documents some important keybindings which are not
269 defined in zsh's default configuration. Hint: press <tab> twice when completing
270 a command you installed which is not yet known to zsh or run 'rehash' manually.
271
272 \commandlistbegin
273 @@INSERT-keybindings@@
274 \commandlistend
275
276 \newpage
277
278 \subsection*{Terminal Settings}
279
280 There are 8 aliases designed to change the font size of terminal
281 emulators (XTerm, Aterm, etc). They are:
282 \kbd{hide},
283 \kbd{tiny},
284 \kbd{small},
285 \kbd{medium},
286 \kbd{default},
287 \kbd{large},
288 \kbd{huge},
289 \kbd{smartfont},
290 \kbd{semifont}.
291
292 \subsection*{Hashes}
293
294 Directory hashes are shortcuts for common directories. You can
295 expand them by typing \kbd{\~{}hash}. Usage: 'cd \kbd{\~}doc'
296
297 \commandlistbegin
298 @@INSERT-hasheddirs@@
299 \commandlistend
300
301 \subsection*{System-Wide Aliases}
302
303 \commandlistbegin
304 @@INSERT-aliases-system@@
305 \commandlistend
306
307 \subsection*{Global Functions}
308
309 \commandlistbegin
310 @@INSERT-functions-system@@
311 @@INSERT-functions-services@@
312 \commandlistend
313
314 \vspace{8pt}
315 \subsection*{Debian commands}
316
317 Please note: if not executed as root, these aliases try to run the command via sudo.
318
319 \commandlistbegin
320 @@INSERT-aliases-debian@@
321 @@INSERT-functions-debian@@
322 \commandlistend
323
324 \subsection*{Aliases for user (grml)}
325
326 \commandlistbegin
327 @@INSERT-aliases-user@@
328 \commandlistend
329
330 \subsection*{Abbreviation expansion for user (grml)}
331
332 As of version 0.9, grml does not enable global aliases anymore. Instead, a
333 feature similiar to vim's 'iab' was added. The default key-sequence to trigger
334 the expansion is '\texttt{C-x\,.}'.
335
336 Example:
337
338 \commandlistbegin
339 \kbd{co}\textbf{<C-x\,.>} \quad expands to: \kbd{./configure \&\& make \&\& sudo make install}
340 \commandlistend
341
342 The configuration of this feature and its implementation are described on the zsh wiki
343 <\url{http://zshwiki.org/home/examples/zleiab}>.
344
345 \commandlistbegin
346 @@INSERT-abbrev@@
347 %\vspace{35pt} % temporary hack for alignment of columns/rows
348 \commandlistend
349
350 \vspace{12pt}
351 Most of the normal aliases are also added to this database, so you may expand them
352 like this as well.
353
354 %\pagebreak
355
356 \subsection*{Functions for user (grml)}
357
358 \textbf{Shortcuts}
359
360 \commandlistbegin
361 @@INSERT-functions-shortcuts@@
362 \commandlistend
363
364 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
365 % Dieser Trenner muss eingefügt werden, wenn eine Tabelle zu lang ist
366 % und daher nicht von LaTeX umbrochen wird.
367 %\commandlistend
368 %
369 %\commandlistbegin
370 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
371
372
373 %%% }}}
374 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
375
376 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
377 %%% Bibliographieverzeichnis {{{
378 %\newpage
379 %\nocite{*}
380 %\bibliographystyle{plaindin}
381 %\bibliography{quellen}
382 %%% }}}
383 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
384
385 \end{document}
386
387 %%% vim:set ai tw=80 fdm=marker:   EOF