Applied patch by Christian Schneider
[zsh-lovers.git] / zsh-lovers.1.txt
index d73fb65..f3830f8 100644 (file)
@@ -7,7 +7,7 @@ zsh-lovers - tips, tricks and examples for the Z shell
 
 SYNOPSIS
 --------
-Just read it ;-)
+Just read it. ;-)
 
 OVERVIEW
 --------
@@ -67,8 +67,8 @@ alias -s tex=vim
 alias -s html=w3m
 alias -s org=w3m
 -----------------
-Now pressing return-key after entering 'foobar.vim' starts vim with
-foobar.vim. Calling a html-file runs browser w3m. 'www.zsh.org' and pressing
+Now pressing return-key after entering 'foobar.tex' starts vim with
+foobar.tex. Calling a html-file runs browser w3m. 'www.zsh.org' and pressing
 enter starts w3m with argument www.zsh.org. +
 Global aliases can be used anywhere in the command line. Example:
 ----------------------
@@ -78,6 +78,7 @@ $ grep alias ~/.zsh/* C
 ----------------------
 Some more or less useful global aliases (choose whether they are useful  or not
 for you on your own):
+
 --------------------------------------------------------
 alias -g ...='../..'
 alias -g ....='../../..'
@@ -150,7 +151,8 @@ zstyle ':completion:*:approximate:*' max-errors 1 numeric
 And  if  you  want  the  number  of  errors  allowed by _approximate to
 increase with the length of what you have typed so far:
 ---------------------------------------------------------------------------------------------------
-zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
+zstyle -e ':completion:*:approximate:*' \ 
+       max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
 ---------------------------------------------------------------------------------------------------
 
 Ignore completion functions for commands you don't have:
@@ -194,6 +196,13 @@ Hint: A list of valid glob Qualifiers can be found in zshexpn(1).
 See ``man 1 zshexpn | less -p'' Qualifiers for details.
 
 -------------------------------------------------------------------------------
+# test if a parameter is numeric
+  $ if [[ $1 == <-> ]] ; then
+         echo numeric
+    else
+         echo non-numeric
+    fi
+
 # Show me all the .c files for which there doesn't exist a .o file.
   $ c=(*.c) o=(*.o(N)) eval 'ls ${${c:#(${~${(j:|:)${o:r}}}).c}:?done}'
 
@@ -355,9 +364,9 @@ See ``man 1 zshexpn | less -p'' Qualifiers for details.
   $ eval "m=($(cat -- $nameoffile)"            # or use
   $ m=("${(@Q)${(z)"$(cat -- $nameoffile)"}}") # to restore it
 
-# get a "ls -l" on all the files in the tree that are younger than a specified 
-# age (e.g "ls -l" all the files in the tree that where modified in the last 2 
-# days)
+# get a "ls -l" on all the files in the tree that are younger than a 
+# specified age (e.g "ls -l" all the files in the tree that where 
+# modified in the last 2 days)
   $ ls -tld **/*(m-2)
 # This will give you a listing 1 file perl line (not à la ls -R).
 # Think of an easy way to have a "ls -R" style output with
@@ -984,8 +993,8 @@ zsh/stat (require zmodload zsh/stat)
   $ file1=foo
   $ file2=bar
   $ touch bar & sleep 5 & touch foo
-  $ echo $file1 is \ 
-    $(($(stat +mtime $file2) - $(stat +mtime $file1))) seconds older than $file2.
+  $ echo $file1 is $(($(stat +mtime $file2) - 
+    $(stat +mtime $file1))) seconds older than $file2.
   bar is 5 seconds older than foo
 
 # list the files of a disk smaller than some other file
@@ -1352,6 +1361,8 @@ Project-page::
   *http://sourceforge.net/projects/zsh/[]*
 Z shell page at sunsite.dk::
     *http://zsh.sunsite.dk/[]*
+From Bash to Z Shell: Conquering the Command Line - the book::
+    *http://www.bash2zsh.com/[]*
 Mailinglistarchive::
     *http://www.zsh.org/mla/[]*
 ZSH-FAQ::
@@ -1374,8 +1385,6 @@ Making the Transition to Zsh::
     *http://www.linux-mag.com/cgi-bin/printer.pl?issue=2002-05&article=power[]*
 Curtains up: introducing the Z shell::
     *http://www-128.ibm.com/developerworks/linux/library/l-z.html?dwzone=linux[]*
-Die Zsh-Liebhaber-Seite::
-    *http://www.infodrom.north.de/~matthi/zsh/[]*
 ZSH-Liebhaberseite::
     *http://michael-prokop.at/computer/tools_zsh_liebhaber.html[]*
 ZSH-Seite von Michael Prokop::
@@ -1383,7 +1392,7 @@ ZSH-Seite von Michael Prokop::
 A Case for the Z Shell on *http://www.daemonnews.org/[]*::
     *http://ezine.daemonnews.org/199910/zsh.html[]*
 ZSH-Section from Dotfiles.com::
-    *http://www.dotfiles.com/index.php3?app_id=4[]*
+    *http://www.dotfiles.com/index.php?app_id=4[]*
 Writing Zsh Completion Functions::
     *http://www.linux-mag.com/2002-07/power_01.html[]*
 ZSH Prompt introduction::
@@ -1393,13 +1402,14 @@ Adam's ZSH page::
 Zzappers Best of ZSH Tips::
     *http://www.rayninfo.co.uk/tips/zshtips.html[]*
 Zsh Webpage by Christian Schneider::
-    *http://strcat.de/zsh/[]*
+    *http://strcat.de/wiki/zsh/[]*
+    *http://strcat.de/wiki/zsh-german[]* (German translation. Help needed!)
 The zsh-lovers webpage::
     *http://grml.org/zsh/[]*
 IRC channel::
     *#zsh at irc.freenode.org*
 The Z shell reference-card (included in the zsh-lovers debian-package)::
-    *http://zsh.sunsite.dk/Refcard/refcard.ps.gz[]*
+    *http://www.bash2zsh.com/zsh_refcard/refcard.pdf[]*
 
 AUTHORS
 -------
@@ -1416,7 +1426,7 @@ Barton E. Schaefer    - http://www.well.com/user/barts/
 Matthias Kopfermann   - http://www.infodrom.north.de/~matthi/
 Oliver Kiddle         - http://people.freenet.de/opk/
 Paul Falstad          - http://www.falstad.com/
-Peter Stephenson      - http://python.swan.ac.uk/~pypeters/
+Peter Stephenson      - http://homepage.ntlworld.com/p.w.stephenson/
 Richard Coleman
 Stephane Chazelas     - http://stephane.chazelas.free.fr/
 Sven Guckes           - http://www.guckes.net/
@@ -1427,24 +1437,28 @@ SEE ALSO
 --------
 Manpages of zsh:
 ------------------------------------------------------------------
-       zsh          Zsh overview (this section)
+       zsh          Zsh overview 
+       zshall       Tthe Z shell meta-man page
+       zshbuiltins  Zsh built-in commands
+       zshcompctl   Zsh completion control
+       zshcompsys   Zsh completion system
+       zshcompwid   Zsh completion widgets
+       zshcontrib   User contributions to zsh
+       zshexpn      Zsh expansion and substitution
        zshmisc      Anything not fitting into the other sections
-       zshexpn      Zsh command and parameter expansion
-       zshparam     Zsh parameters
+       zshmodules   Zsh loadable modules
        zshoptions   Zsh options
-       zshbuiltins  Zsh built-in functions
+       zshparam     Zsh parameters
+       zshroadmap   Informal introduction to the zsh manual
+       zshtcpsys    Zsh tcp system
        zshzle       Zsh command line editing
-       zshcompwid   Zsh completion widgets
-       zshcompsys   Zsh completion system
-       zshcompctl   Zsh completion control
-       zshmodules   Zsh loadable modules
        zshzftpsys   Zsh built-in FTP client
        zshall       Meta-man page containing all of the above
 ------------------------------------------------------------------
 
 Note: especially 'man zshcontrib' covers very useful topics! +
 Book: *From Bash to Z Shell* by Oliver Kiddle, Jerry Peck and Peter
-Stephenson. *ISBN: 1590593766*. +
+Stephenson. *ISBN: 1590593766*. - *http://www.bash2zsh.com/[bash2zsh.com]* +
 Also take a look at the section *LINKS* in this manpage.
 
 BUGS
@@ -1458,4 +1472,4 @@ COPYRIGHT
 Copyright  \(C) Michael Prokop, Christian Schneider and Matthias
 Kopfermann.
 
-// vim:tw=80
+// vim:tw=80 ai