X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=grml-zsh-refcard.tex.in;h=c60c0fa0efa692c56ee8dec16708050fb7de3d53;hb=c2292933e9dece009592d9d4f92520a96e08b857;hp=89ff86c5c448efc0517f3058c446301c83c7db1b;hpb=c2e10b6a89638c6f7495a61c6648820a938a4031;p=grml-gen-zshrefcard.git diff --git a/grml-zsh-refcard.tex.in b/grml-zsh-refcard.tex.in index 89ff86c..c60c0fa 100644 --- a/grml-zsh-refcard.tex.in +++ b/grml-zsh-refcard.tex.in @@ -124,14 +124,13 @@ %%% Oben: Links, Mitte, Rechts \ihead[]{{\Huge GRML-Zsh-Refcard}} \chead[]{} - \ohead[]{Revision: Die Feb 06 20:11:16 CET 2007} - %\ohead[]{Revision: \today} + \ohead[]{Generated: \today} %%% Unten: Links, Mitte, Rechts \ifoot[]{\vspace{-3pt}GRML-Zsh-Refcard} \cfoot[]{} - \ofoot[]{\vspace{-3pt}\copyright 2005-2007 \href{mailto:julius@grml.org}{Julius Plenz}, + \ofoot[]{\vspace{-3pt}\copyright 2005-2008 \href{mailto:julius@grml.org}{Julius Plenz}, \href{mailto:mika@grml.org}{Michael Prokop} and - \href{mailto:ft@bewatermyfriend.de}{Frank Terbeck}} + \href{mailto:ft@grml.org}{Frank Terbeck}} %%% }}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -206,57 +205,59 @@ \subsection*{Configuration files} -\small{Global zsh configuration is located in \textbf{/etc/zsh/zshrc}. User +\small{The global zsh configuration is located in \textbf{/etc/zsh/zshrc}. User specific settings are defined in \textbf{/etc/skel/.zshrc} (which can be found -in \kbd{\~}/.zshrc for user grml too). Please notice that some functions/aliases -are not active by default for user root (referred to as '... for user (grml)' -below) because of security reasons. Just run 'zshskel' (as user root) to source -the file /etc/skel/.zshrc. Some aliases/functions also aren't active if the -appropriate executable isn't present on your system. - -/etc/zsh/zshrc: this file can be adjusted according to your needs via using a -file named /etc/zsh/zshrc.local which is not part of the Debian package -management. So place all your changes in the file /etc/zsh/zshrc.local. If you -don't have write permissions to /etc/zsh/zshrc on your own, copy the file -/etc/zsh/zshrc to \kbd{\~}/.zshrc.global and it will be sourced by -\kbd{\~}/.zshrc then. - -Write important commands you always need (no matter what's inside zsh's -history!) to a file named \textbf{\kbd{\~}/.important\_commands}. - -Notice that /etc/skel/.zshrc itself is not sourced by zsh but copied to -\$HOME-directory of your non-root user once. To keep your -\textbf{\kbd{\~}/.zshrc} in sync with upstream's development just put your +in \kbd{\~}/.zshrc of the user grml, as well). Please note that some +functions/aliases are not active by default for user root (referred to as +'... for user (grml)' below) for of security reasons. Simply run 'zshskel' +(as root) to source /etc/skel/.zshrc. Some aliases/functions are not activated +if the appropriate executable isn't present on your system, either. + +/etc/zsh/zshrc: this file can be adjusted according to your needs via a file +named /etc/zsh/zshrc.local, which is not under the control of Debian package +management. This, you need to place all your changes in the file +/etc/zsh/zshrc.local. If you do not have write permission to +/etc/zsh/zshrc, copy the file /etc/zsh/zshrc to \kbd{\~}/.zshrc.global +and it will be sourced by \kbd{\~}/.zshrc. + +Put important commands which you need on a regular basis into a file named +\textbf{\kbd{\~}/.important\_commands}. + +Note that /etc/skel/.zshrc itself is not sourced by zsh, but copied to the +\$HOME-directory of your non-root user on user creation. To keep your +\textbf{\kbd{\~}/.zshrc} in sync with upstream's development, just put your personal stuff into a file named \textbf{\kbd{\~}/.zshrc.local} and point your -\kbd{\~}/.zshrc to /etc/skel/.zshrc running 'ln -s /etc/skel/.zshrc +\kbd{\~}/.zshrc to /etc/skel/.zshrc by running 'ln -s /etc/skel/.zshrc \kbd{\~}/.zshrc'.} -You can get information regarding configuration files and some environment -variables to adjust runtime behaviour of grml's zsh running \textbf{zsh-help}. +More information regarding configuration files and some environment +variables to adjust runtime behaviour of grml's zsh can be accessed by +running \textbf{zsh-help}. \subsection*{Using grml's zsh configuration on a non-grml system} You do not have to use grml/Debian to use grml's zsh configuration. -Just retrieve and install the configuration files for example running: +Just retrieve and install the configuration files in your home directory. +You can do this by running: \begin{tiny} \begin{verbatim} -wget -O ~/.zshrc http://hg.grml.org/grml-etc-core/raw-file/tip/etc/skel/.zshrc -wget -O ~/.zshrc.global http://hg.grml.org/grml-etc-core/raw-file/tip/etc/zsh/zshrc +wget -O .zshrc http://git.grml.org/f/grml-etc-core/etc/skel/.zshrc +wget -O .zshrc.global http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc \end{verbatim} \end{tiny} \subsection*{Problems?} -Please report any problems you notice using the grml zsh configuration -to the grml-team. The configuration has been tested on several Linux -Distribution (Debian, Gentoo, SuSE,...) and non-Linux systems as well -(FreeBSD, Solaris, AIX,...) but there might be issues anyway. Please -\href{http://grml.org/bugs/}{report them}! +Please report any problems you encounter while using the grml zsh +configuration to the grml team. The configuration has been tested on several +Linux distributions (Debian, Gentoo, SuSE, etc) and non-Linux systems as well +(FreeBSD, Solaris, AIX, etc), but there might be issues, anyway. +\href{http://grml.org/bugs/}{Report them, please!} \subsection*{Settings} -If not already defined, the variables are set to the following +If not already defined, these variables are set to the following values: \commandlistbegin @@ -268,22 +269,21 @@ values: \command{umask @@INSERT-other-r_umask@@}{new files for root user \kbd{@@INSERT-other-r_umaskstr@@}} \commandlistend -\subsection*{Key Bindings} +\subsection*{Keybindings} Default keybinding mode is Emacs, i.e. you can use Emacs keybinds like -\kbd{^A {\rm or} ^E} on the command line. You can however also switch -to vi mode. +\kbd{^A {\rm or} ^E} on the command line. However, you can switch to vi +mode. \commandlistbegin \command{setopt emacs}{Switch to Emacs mode (default)} \command{setopt vi}{Switch to vi mode} \commandlistend -\subsection*{Keybindings} - -The following keybindings document some important keybindings which are not -defined by zsh's default configuration. Tip: press twice when completing a -command you installed which is not yet known to zsh or run 'rehash' manually. +\vspace{8pt} +The following documents some important keybindings which are not +defined in zsh's default configuration. Hint: press twice when completing +a command you installed which is not yet known to zsh or run 'rehash' manually. \commandlistbegin @@INSERT-keybindings@@ @@ -293,8 +293,8 @@ command you installed which is not yet known to zsh or run 'rehash' manually. \subsection*{Terminal Settings} -There are 8 aliases designed to change the font size of the -XTerm, Aterm\ldots These are: +There are 8 aliases designed to change the font size of terminal +emulators (XTerm, Aterm, etc). They are: \kbd{hide}, \kbd{tiny}, \kbd{small}, @@ -307,8 +307,8 @@ XTerm, Aterm\ldots These are: \subsection*{Hashes} -Directory hashes are shortcuts for often used directories. You can -expand them by typing \kbd{\~{}hash}. Usage example: 'cd \kbd{\~}doc' +Directory hashes are shortcuts for common directories. You can +expand them by typing \kbd{\~{}hash}. Usage: 'cd \kbd{\~}doc' \commandlistbegin @@INSERT-hasheddirs@@ @@ -330,8 +330,7 @@ expand them by typing \kbd{\~{}hash}. Usage example: 'cd \kbd{\~}doc' \vspace{8pt} \subsection*{Debian commands} -Notice: if not executed as root it tries to run the command via sudo if -necessary. +Please note: if not executed as root, these aliases try to run the command via sudo. \commandlistbegin @@INSERT-aliases-debian@@ @@ -346,7 +345,7 @@ necessary. \subsection*{Abbreviation expansion for user (grml)} -As of version 0.9 grml does not enable global aliases anymore. Instead, a +As of version 0.9, grml does not enable global aliases anymore. Instead, a feature similiar to vim's 'iab' was added. The default key-sequence to trigger the expansion is ',.'. @@ -356,7 +355,7 @@ Example: \kbd{co}\begin{Huge},.\end{Huge} \quad expands to: \kbd{./configure \&\& make \&\& sudo make install} \commandlistend -The configuration of this feature and its implementation are described in the zshwiki +The configuration of this feature and its implementation are described on the zsh wiki <\url{http://zshwiki.org/home/examples/zleiab}>. \commandlistbegin @@ -366,34 +365,10 @@ The configuration of this feature and its implementation are described in the zs \vspace{12pt} Most of the normal aliases are also added to this database, so you may expand them -just like this as well. +like this as well. %\pagebreak -%% Global Aliases are disabled ATM. -%\subsection*{Global Aliases} -% -%Global Aliases are expanded {\it everywhere} on the command line, not -%only if they are at the first position. Example: 'cat foo bar C' is the -%same as running 'cat foo bar | wc -l'. -% -%\commandlistbegin -%\command{BG}{\kbd{\& exit}} -%\command{C}{\kbd{| wc -l}} -%\command{G}{\kbd{| grep}} -%\command{H}{\kbd{| head}} -%\command{Hl}{\kbd{-{}-help |\& less -r} \quad(display help in pager)} -%\command{K}{\kbd{| keep}} -%\command{L}{\kbd{| less}} -%\command{M}{\kbd{| most}} -%\command{N}{\kbd{\&>/dev/null} \quad(No Output)} -%\command{R}{\kbd{| tr A-z N-za-m} \quad(ROT13)} -%\command{SL}{\kbd{| sort | less}} -%\command{S}{\kbd{| sort}} -%\command{T}{\kbd{| tail}} -%\command{V}{\kbd{| vim -}} -%\commandlistend - \subsection*{Functions for user (grml)} \textbf{Searching}