X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=doc%2Fgrmlzshrc.t2t;h=aab18a8a9c8007103e5c59b56e8fbcbd48212702;hb=refs%2Fheads%2Fxro%2Fdemac;hp=1398a7a2bc6ef2f016f8b83cab35919534e1c080;hpb=19cfd450e9e597d7aa1483a96a0d5c717047830e;p=grml-etc-core.git diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index 1398a7a..aab18a8 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -1,13 +1,13 @@ GRMLZSHRC -June, 2010 +July, 2011 %!target: man %!postproc(man): "^(\.TH.*) 1 " "\1 5 " = NAME = -grmlzshrc - grml's zsh setup +grmlzshrc - Grml's zsh setup = SYNOPSIS = @@ -15,7 +15,7 @@ grmlzshrc - grml's zsh setup = DESCRIPTION = -The grml project provides a fairly exhaustive interactive setup (referred to +The Grml project provides a fairly exhaustive interactive setup (referred to as //grmlzshrc// throughout this document) for the amazing unix shell zsh (http://zsh.sourceforge.net). This is the reference manual for that setup. @@ -28,6 +28,18 @@ root user (**EUID** == 0) only a subset of features is loaded by default. This behaviour can be altered by setting the **GRML_ALWAYS_LOAD_ALL** STARTUP VARIABLE (see below). +Users may want to keep an up-to-date version of the setup (possibly from the +git-sources) in //~/.zshrc//. If that happens on a system where the global +zshrc is also a //grmlzshrc// (but possibly an older one), you can inhibit +loading the global version by doing: +\ +``` +echo setopt no_global_rcs >> ~/.zshenv +``` + +Note, that this will disable //ANY// global files, except for the global +zshenv file. + = STARTUP VARIABLES = Some of the behaviour of //grmlzshrc// can be altered by setting certain shell variables. These may be set temporarily when starting zsh like this: @@ -45,7 +57,7 @@ A non zero value activates a handler, which is called when a command can not be found. The handler is defined by GRML_ZSH_CNF_HANDLER (see below). : **GRML_ALWAYS_LOAD_ALL** -Enables the whole grml setup for root, if set to a non zero value. +Enables the whole Grml setup for root, if set to a non zero value. : **GRML_ZSH_CNF_HANDLER** This variable contains the handler to be used by COMMAND_NOT_FOUND (see above) @@ -59,7 +71,7 @@ grml-small. Where zsh saves the history. Default: ${HOME}/.zsh_history. : **HISTSIZE** -Number of commands to be kept in the history. On a grml-CD this defaults to +Number of commands to be kept in the history. On a Grml-CD this defaults to 500, on a hard disk installation to 5000. : **MAILCHECK** @@ -82,7 +94,7 @@ Show time (user, system and cpu) used by external commands, if they run longer than the defined number of seconds (default: 5). : **SAVEHIST** -Number of commands to be stored in ${HISTFILE}. Defaults to 1000 on a grml-CD +Number of commands to be stored in ${HISTFILE}. Defaults to 1000 on a Grml-CD and to 10000 on an installation on hard disk. : **watch** @@ -412,9 +424,18 @@ Deletes a word left of the cursor; seeing '/' as additional word separator. : **CTRL-x-1** Jump right after the first word. +: **CTRL-x-M()** +Create directory under cursor or the selected area. +To select an area press ctrl-@ and use the cursor. +Use case: you type "mv abc ~/testa/testb/testc/" and remember that the +directory does not exist yet -> press **CTRL-xM** and problem solved. + : **CTRL-x-p** Searches the last occurence of string before the cursor in the command history. +: **CTRL-x-z** +Display help on keybindings and zsh line editor. Press consecutively to page through content. + : **CTRL-z** Brings a job, which got suspended with CTRL-z back to foreground. @@ -427,11 +448,6 @@ user's life. Converts plaintext files to HTML using vim. The output is written to .html. -: **2mp3_192()** -Useful if you own players lacking ogg/flac support. -Takes a list of "*.ogg" and "*.flac" files and transcodes them to mp3 -with a variable bitrate of at least 192, while preserving basic id3 tags. - : **855resolution()** If 915resolution is available, issues a warning to the user to run it instead to modify the resolution on intel graphics chipsets. @@ -484,11 +500,6 @@ Simple backup of a file or directory using cp(1). The target file name is the original name plus a time stamp attached. Symlinks and file attributes like mode, ownership and timestamps are preserved. -: **brltty()** -The brltty(1) program provides a braille display, so a blind person can access -the console screen. This wrapper function works around problems with some -environments (f. e. utf8). - : **cdiff()** Runs a recursive diff(1) over two given directories trying to find the smallest set of changes. Three lines of context will be printed and binary @@ -499,6 +510,10 @@ If the original cdrecord is not installed, issues a warning to the user to use the wodim binary instead. Wodim is the debian fork of Joerg Schillings cdrecord. +: **cdt()** +Creates a temporary directory using mktemp. Then changes current +working directory to it. + : **changed()** Lists files in current directory, which have been changed within the last N days. N is an integer to be passed as first and only argument. @@ -790,9 +805,16 @@ Runs a command in $SHELL with profiling enabled (See startup variable ZSH_PROFILE_RC above). : **purge()** -Removes typical temporary files (i. e. files like "*~", ".*~", "#*#", "*.o", -"a.out", "*.core", "*.cmo", "*.cmi" and ".*.swp") from current directory. -Asks for confirmation. +Removes temporary files from current directory. Asks for confirmation. Uses sudo if necessary. +In detail it purges + - common temp files like "*~", ".*~", "#*#", "*.o", "a.out", "*.orig", "*.rej", "*.cmo", "*.cmi" and ".*.swp" + - core dumps + - debconf backup files: "*.dpkg-old", "*.dkpg-new", "*.dpkg-dist" + - gentoo dispatch-conf backups: ".cfg0000_*", ".mrg0000_*" + - precompiled python code ("*.pyc", "*.pyo") as long as matching "*.py" source is also present + - LaTeX temp files i.e. "*.(log|toc|aux|nav|snm|out|tex.backup|bbl|blg|bib.backup|vrb|lof|lot|hd|idx)" for any present "*.tex" + - ghc temp files, as long as matching "*.hs" or "*.lhs" is also present + - "*.mood(D)" Files which are missing their corresponding audio file : **readme()** Opens all README-like files in current working directory with the program @@ -805,6 +827,11 @@ Reloads functions given as parameters. Checks whether a regular expression (first parameter) matches a string (second parameter) using perl. +: **rundirs()** +Takes as first parameter a quoted string containing an exectuable command or function with arguments. +Following that it takes a bunch of directories, which will then be traversed, executing the +first argument in each one. E.g.: rundirs purge . **/*(/-/) + : **salias()** Creates an alias whith sudo prepended, if $EUID is not zero. Run "salias -h" for details. See also xunfunction() below. @@ -829,8 +856,11 @@ Lists the content of a gzipped tar archive in default pager. Shows the content of a zip archive in default pager. : **simple-extract()** -Tries to uncompress/unpack given file with the appropriate programs. The -choice is made along the filename ending. +Tries to uncompress/unpack given files with the appropriate programs. If an URI +starting with https, http or ftp is provided simple-extract tries to download +and then uncompress/unpack the file. The choice is made along the filename +ending. simple-extract will not delete the original archive (even on .gz,.bz2 or +.xz) unless you use the '-d' option. : **sll()** Prints details of symlinks given as arguments. @@ -884,10 +914,6 @@ Shows some information about current system status. : **swiki()** Searches articles in the german Wikipedia for the term given as argument. -: **swspeak()** -Sets up software synthesizer by calling swspeak-setup(8). Kernel boot option -swspeak must be set for this to work. - : **trans()** Translates a word from german to english (-D) or vice versa (-E). @@ -1069,6 +1095,9 @@ Prints installed Packages sorted by size (descending). Sets font of xterm to "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-15" using escape sequence. +: **demac** (//rm -vfRi **/.(_.|)DS_Store(.) **/._.Trashes(.) **/.Trashes(/) **/.fseventsd(/)//) +Clean a drive or directory tree of those pesky OSX metadata-files + : **dir** (//ls -lSrah//) Lists files (including dot files) sorted by size (biggest last) in long and human readable output format. @@ -1504,10 +1533,10 @@ Beckert . = COPYRIGHT = -Copyright (c) 2009-2010 grml project +Copyright (c) 2009-2011 Grml project This manpage is distributed under the terms of the GPL version 2. Most parts of grml's zshrc are distributed under the terms of GPL v2, too, -except for **accept-line()** and **vcs_info()**, which are distributed under -the same conditions as zsh itself (which is BSD-like). +except for **accept-line()** which are distributed under the same conditions +as zsh itself (which is BSD-like).