zsh-users
 help / color / mirror / code / Atom feed
* Z-Shell (zsh) FAQ changes this month
@ 2002-03-24 19:31 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-03-24 19:31 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.




Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/03/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  2.3   More description about alias pitfalls.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

2.3: Why do my csh aliases not work?  (Plus other alias pitfalls.)

  First of all, check you are using the syntax

    alias newcmd='list of commands'

  and not

    alias newcmd 'list of commands'

  which won't work. (It tells you if `newcmd' and `list of commands' are
  already defined as aliases.)

  Otherwise, your aliases probably contain references to the command
  line of the form `\!*', etc.  Zsh does not handle this behaviour as it
  has shell functions which provide a way of solving this problem more
  consistent with other forms of argument handling.  For example, the
  csh alias

    alias cd 'cd \!*; echo $cwd'

  can be replaced by the zsh function,

    cd() { builtin cd "$@"; echo $PWD; }

  (the `builtin' tells zsh to use its own `cd', avoiding an infinite loop)
  or, perhaps better,

    cd() { builtin cd "$@"; print -D $PWD; }

  (which converts your home directory to a ~).  In fact, this problem is
  better solved by defining the special function chpwd() (see the manual).
  Note also that the `;' at the end of the function is optional in zsh,
  but not in ksh or sh (for sh's where it exists).

  Here is Bart Schaefer's guide to converting csh aliases for zsh.

  1) If the csh alias references "parameters" (\!:1, \!* etc.),
     then in zsh you need a function (referencing $1, $* etc.).
     Otherwise, you can use a zsh alias.

  2) If you use a zsh function, you need to refer _at_least_ to
     $* in the body (inside the { }).  Parameters don't magically
     appear inside the { } the way they get appended to an alias.

  3) If the csh alias references its own name (alias rm "rm -i"),
     then in a zsh function you need the "command" keyword
     (function rm() { command rm -i "$@" }), but in a zsh alias
     you don't (alias rm="rm -i").

  4) If you have aliases that refer to each other (alias ls "ls -C";
     alias lf "ls -F" ==> lf == ls -C -F) then you must either:

        o  convert all of them to zsh functions; or
        o  after converting, be sure your .zshrc defines all of your
           aliases before it defines any of your functions.

     Those first four are all you really need, but here are four more for
     heavy csh alias junkies:

  5) Mapping from csh alias "parameter referencing" into zsh function
     (assuming SH_WORD_SPLIT and KSH_ARRAYS are NOT set in zsh):

      csh             zsh
     =====         ==========
     \!*           $*              (or $argv)
     \!^           $1              (or $argv[1])
     \!:1          $1
     \!:2          $2              (or $argv[2], etc.)
     \!$           $*[$#]          (or $argv[$#], or $*[-1])
     \!:1-4        $*[1,4]
     \!:1-         $*[1,$#-1]      (or $*[1,-2])
     \!^-          $*[1,$#-1]
     \!*:q         "$@"
     \!*:x         $=*             ($*:x doesn't work (yet))

  6) Remember that it is NOT a syntax error in a zsh function to
     refer to a position ($1, $2, etc.) greater than the number of
     parameters. (E.g., in a csh alias, a reference to \!:5 will
     cause an error if 4 or fewer arguments are given; in a zsh
     function, $5 is the empty string if there are 4 or fewer
     parameters.)

  7) To begin a zsh alias with a - (dash, hyphen) character, use
     `alias --':

             csh                            zsh
        ===============             ==================
        alias - "fg %-"             alias -- -="fg %-"

  8) Stay away from `alias -g' in zsh until you REALLY know what
     you're doing.

  There is one other serious problem with aliases: consider

    alias l='/bin/ls -F'
    l() { /bin/ls -la "$@" | more }

  `l' in the function definition is in command position and is expanded
  as an alias, defining `/bin/ls' and `-F' as functions which call
  `/bin/ls', which gets a bit recursive.  This can be avoided if you use
  `function' to define a function, which doesn't expand aliases.  It is
  possible to argue for extra warnings somewhere in this mess.

  Earlier versions of the FAQ claimed `it is not possible to define
  `function' as an alias'.  This turns out to be false; you can even
  confuse yourself this way.  The point to remember is that aliases are
  quite deliberately a way of subverting the shell's syntax for special
  effects.  If you wish to be completely safe, you should stick with
  functions.

  Bart Schaefer's rule is:  Define first those aliases you expect to
  use in the body of a function, but define the function first if the
  alias has the same name as the function.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- zshfaq.yo	2002/02/24 13:47:52	1.77
+++ zshfaq.yo	2002/03/24 19:23:57	1.78
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/02/24)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/03/24)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/02/24
+mydit(Last-Modified:) 2002/03/24
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(1.6)   Modified list of FTP mirrors (from Geoff Wing).
+  mydit(2.3)   More description about alias pitfalls.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -840,8 +840,14 @@
   as an alias, defining mytt(/bin/ls) and mytt(-F) as functions which call
   mytt(/bin/ls), which gets a bit recursive.  This can be avoided if you use
   mytt(function) to define a function, which doesn't expand aliases.  It is
-  possible to argue for extra warnings somewhere in this mess.  Luckily,
-  it is not possible to define mytt(function) as an alias.
+  possible to argue for extra warnings somewhere in this mess.
+
+  Earlier versions of the FAQ claimed `it is not possible to define
+  mytt(function) as an alias'.  This turns out to be false; you can even
+  confuse yourself this way.  The point to remember is that aliases are
+  quite deliberately a way of subverting the shell's syntax for special
+  effects.  If you wish to be completely safe, you should stick with
+  functions.
 
   Bart Schaefer's rule is:  Define first those aliases you expect to
   use in the body of a function, but define the function first if the


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2003-04-30 18:48 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2003-04-30 18:48 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2003/04/30
Submitted-By: john@io.com (John Buttery)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2003 (see end of document)

Changes since last issue posted:

    No changes this month.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

No substantive changes.

--- End of changed items, diff from previous version follows ---

Nothing interesting.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2003-01-26 17:42 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2003-01-26 17:42 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.




Archive-Name: unix-faq/shell/zsh
Last-Modified: 2003/01/26
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2002 (see end of document)

Changes since last issue posted:

    No changes this month.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.


--- End of general information, changed items follow in full ---

No substantive changes.

--- End of changed items, diff from previous version follows ---

Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- zshfaq.yo	2002/12/01 14:22:44	1.83
+++ zshfaq.yo	2003/01/26 17:23:38	1.84
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/12/01)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2003/01/26)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/12/01
+mydit(Last-Modified:) 2003/01/26
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2002 (see end of document)


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-09-27 21:42 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-09-27 21:42 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.




Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/09/27
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  2.1  Long-standing typo.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

No substantive changes.

--- End of changed items, diff from previous version follows ---

Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- zshfaq.yo	2002/08/25 16:35:29	1.81
+++ zshfaq.yo	2002/09/27 21:39:57	1.82
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/08/25)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/09/27)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/08/25
+mydit(Last-Modified:) 2002/09/27
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(1.5) 4.0.6 released.
+  mydit(2.1)  Long-standing typo.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -600,7 +600,7 @@
         tt(NO_NOMATCH)).
     it()* The results of parameter substitutions are treated as plain text:
         mytt(foo="*"; print $foo) prints all files in ksh but mytt(*) in zsh
-        (uset tt(GLOB_SUBST)).
+        (unset tt(GLOB_SUBST)).
     it()* tt($PSn) do not do parameter substitution by default (use \
 PROMPT_SUBST).
     it()* Standard globbing does not allow ksh-style `pattern-lists'.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-08-25 16:42 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-08-25 16:42 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/08/25
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.5 4.0.6 released.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

1.5: What's the latest version?

  Zsh 4.0.6 is the latest production version.  The major number 4.0
  reflects major improvements to modularity and to improvements in
  the editor, programmable completion and many other smaller features
  over the 3.0 series.  (The previous widely available release was
  4.0.4.)

  There will not be any further 3.0 releases now that 4.0 has become
  the stable version.  However, a few patches to 3.0.8 are available from
  the patch manager at Sourceforge, http://sourceforge.net/patch/?group_id=4068
  Official patches are posted by Bart Schaefer (user name barts).

  A beta of the next version is often available.  Development of zsh is
  patch by patch, with each intermediate version publicly available.  Note
  that this `open' development system does mean bugs are sometimes
  introduced into the most recent archived version.  These are usually
  fixed quickly.  If you are really interested in getting the latest
  improvements, and less worried about providing a stable environment,
  development versions are uploaded quite frequently to the archive in the
  development subdirectory.

  Note also that as the shell changes, it may become incompatible with
  older versions; see the end of question 5.1 for a partial list.
  Changes of this kind are almost always forced by an awkward or
  unnecessary feature in the original design (as perceived by current
  users), or to enhance compatibility with other Bourne shell
  derivatives, or (mostly in the 3.0 series) to provide POSIX compliancy.


--- End of changed items, diff from previous version follows ---

Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- zshfaq.yo	2002/05/25 16:51:11	1.80
+++ zshfaq.yo	2002/08/25 16:35:29	1.81
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/05/25)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/08/25)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/05/25
+mydit(Last-Modified:) 2002/08/25
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit() None.
+  mydit(1.5) 4.0.6 released.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -296,11 +296,11 @@
 
 sect(What's the latest version?)
 
-  Zsh 4.0.4 is the latest production version.  The major number 4.0
+  Zsh 4.0.6 is the latest production version.  The major number 4.0
   reflects major improvements to modularity and to improvements in
   the editor, programmable completion and many other smaller features
   over the 3.0 series.  (The previous widely available release was
-  4.0.2.)
+  4.0.4.)
 
   There will not be any further 3.0 releases now that 4.0 has become
   the stable version.  However, a few patches to 3.0.8 are available from


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-06-24 21:05 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-06-24 21:05 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/05/25
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

   None.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

No changes this month.

--- End of changed items, diff from previous version follows ---

Even this hasn't changed.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-05-25 16:54 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-05-25 16:54 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/05/25
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

   None.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

No changes this month.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- zshfaq.yo	2002/04/24 21:09:46	1.79
+++ zshfaq.yo	2002/05/25 16:51:11	1.80
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/04/24)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/05/25)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/04/24
+mydit(Last-Modified:) 2002/05/25
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,8 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(passim) Be more explicit about how to set options.
-  mydit(1.7)    More care about infinite loops exec'ing zsh.
+  mydit() None.
 )
 
 This document contains a list of frequently-asked (or otherwise


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-04-24 20:55 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-04-24 20:55 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.





Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/04/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  passim Be more explicit about how to set options.
  1.7    More care about infinite loops exec'ing zsh.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

1.7: I don't have root access: how do I make zsh my login shell?

  Unfortunately, on many machines you can't use `chsh' to change your
  shell unless the name of the shell is contained in /etc/shells, so if
  you have your own copy of zsh you need some sleight-of-hand to use it
  when you log on.  (Simply typing `zsh' is not really a solution since
  you still have your original login shell waiting for when you exit.)

  The basic idea is to use `exec <zsh-path>' to replace the current
  shell with zsh.  Often you can do this in a login file such as .profile 
  (if your shell is sh or ksh) or .login (if it's csh).  Make sure you
  have some way of altering the file (e.g. via FTP) before you try this as
  `exec' is often rather unforgiving. 

  If you have zsh in a subdirectory `bin' of your home directory,
  put this in .profile:

    [ x$ZSH_VERSION = x -a -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l

  --- the first test is a safeguard to avoid an infinite loop in case
  your zsh is set up to source your .profile, which is quite a common
  trick as you can save a lot of duplication that way.  If your login
  shell is csh or tcsh, put this in .login:

    if ( -f ~/bin/zsh ) exec ~/bin/zsh -l

  (in each case the `-l' tells zsh it is a login shell).

  If you want to check this works before committing yourself to it,
  you can make the login shell ask whether to exec zsh.  The following
  work for Bourne-like shells:

    [ -f $HOME/bin/zsh ] && {
            echo "Type Y to run zsh: \c"
            read line
            [ "$line" = Y ] && exec $HOME/bin/zsh -l
    }

  and for C-shell-like shells:

    if ( -f ~/bin/zsh ) then
            echo -n "Type Y to run zsh: "
            if ( "$<" == Y ) exec ~/bin/zsh -l
    endif

  It's not a good idea to put this (even without the -l) into .cshrc,
  at least without some tests on what the csh is supposed to be doing,
  as that will cause _every_ instance of csh to turn into a zsh and
  will cause csh scripts (yes, unfortunately some people write these)
  which do not call `csh -f' to fail.  If you want to tell xterm to
  run zsh, change the SHELL environment variable to the full path of
  zsh at the same time as you exec zsh (in fact, this is sensible for
  consistency even if you aren't using xterm).  If you have to exec
  zsh from your .cshrc, a minimum safety check is `if ($?prompt) exec
  zsh'.

  If you like your login shell to appear in the process list as `-zsh',
  you can link `zsh' to `-zsh' (e.g. by `ln -s ~/bin/zsh 
  ~/bin/-zsh') and change the exec to `exec -zsh'.  (Make sure
  `-zsh' is in your path.) This has the same effect as the `-l'
  option. 

  There was a thread on this topic on the zsh-workers mailing list,
  starting from item 15747.  You can find this at http://www.zsh.org/mla/.

  Footnote: if you DO have root access, make sure zsh goes in
  /etc/shells on all appropriate machines, including NIS clients, or you
  may have problems with FTP to that machine.

2.1: Differences from sh and ksh

  (The following refers to shell options extensively.  To turn an
  option on in zsh you use `setopt var(optionname)', and to turn
  it off you use `unsetopt var(optionname)'.  The option name is
  case insensitive and underscores are ignored.  If you are used to ksh,
  that syntax works too.)

  Most features of ksh (and hence also of sh) are implemented in zsh;
  problems can arise because the implementation is slightly different.
  Note also that not all ksh's are the same either.  I have based this
  on the 11/16/88f version of ksh; differences from ksh93 will be more
  substantial.

  As a summary of the status:

  1) because of all the options it is not safe to assume a general
     zsh run by a user will behave as if sh or ksh compatible;
  2) invoking zsh as sh or ksh (or if either is a symbolic link to
     zsh) sets appropriate options and improves compatibility (from
     within zsh itself, calling `ARGV0=sh zsh' will also work);
  3) from version 3.0 onward the degree of compatibility with sh
     under these circumstances is very high:  zsh can now be used
     with GNU configure or perl's Configure, for example;
  4) the degree of compatibility with ksh is also high, but a few
     things are missing:  for example the more sophisticated
     pattern-matching expressions are different for versions before
     3.1.3 --- see the detailed list below;
  5) also from 3.0, the command `emulate' is available: `emulate
     ksh' and `emulate sh' set various options as well as changing the
     effect of single-letter option flags as if the shell had been
     invoked with the appropriate name.  Including the command
     `emulate sh; setopt localoptions' in a shell function will
     turn on sh emulation for that function only.  In 4.0 (and in
     3.0.6 through 8), this can be abbreviated as `emulate -L sh'.

  The classic difference is word splitting, discussed in question 3.1;
  this catches out very many beginning zsh users.  As explained there,
  this is actually a bug in every other shell.  The answer is to set
  SH_WORD_SPLIT for backward compatibility.  The next most classic
  difference is that unmatched glob patterns cause the command to abort;
  set NO_NOMATCH for those.

  Here is a list of various options which will increase ksh
  compatibility, though maybe decrease zsh's abilities: see the manual
  entries for GLOB_SUBST, IGNORE_BRACES (though brace expansion occurs
  in some versions of ksh), KSH_ARRAYS, KSH_GLOB, KSH_OPTION_PRINT,
  LOCAL_OPTIONS, NO_BAD_PATTERN, NO_BANG_HIST, NO_EQUALS, NO_HUP,
  NO_NOMATCH, NO_RCS, NO_SHORT_LOOPS, PROMPT_SUBST, RM_STAR_SILENT,
  POSIX_BUILTINS, SH_FILE_EXPANSION, SH_GLOB, SH_OPTION_LETTERS,
  SH_WORD_SPLIT (see question 3.1) and SINGLE_LINE_ZLE.
  Note that you can also disable any built-in commands which get in
  your way.  If invoked as `ksh', the shell will try to set suitable
  options.

  Here are some differences from ksh which might prove significant for
  ksh programmers, some of which may be interpreted as bugs; there
  must be more.  Note that this list is deliberately rather full and
  that most of the items are fairly minor.  Those marked `*' perform
  in a ksh-like manner if the shell is invoked with the name `ksh', or
  if `emulate ksh' is in effect.  Capitalised words with underlines
  refer to shell options. 

  o  Syntax:

    o * Shell word splitting: see question 3.1.
    o * Arrays are (by default) more csh-like than ksh-like:
        subscripts start at 1, not 0; array[0] refers to array[1];
        `$array' refers to the whole array, not $array[0];
        braces are unnecessary: $a[1] == ${a[1]}, etc.
        Set the KSH_ARRAYS option for compatibility.
    o   Coprocesses are established by `coproc'; `|&' behaves like
        csh.  Handling of coprocess file descriptors is also different.
    o   In `cmd1 && cmd2 &', only `cmd2' instead of the whole
        expression is run in the background in zsh.  The manual implies
        this is a bug.  Use `{ cmd1 && cmd2 } &' as a workaround.

  o  Command line substitutions, globbing etc.:

    o * Failure to match a globbing pattern causes an error (use
        NO_NOMATCH).
    o * The results of parameter substitutions are treated as plain text:
        `foo="*"; print $foo' prints all files in ksh but `*' in zsh
        (uset GLOB_SUBST).
    o * $PSn do not do parameter substitution by default (use PROMPT_SUBST).
    o * Standard globbing does not allow ksh-style `pattern-lists'.
        Equivalents:

----------------------------------------------------------------------
      ksh              zsh         Meaning
     ------           ------       ---------
     !(foo)            ^foo        Anything but foo.
                or   foo1~foo2     Anything matching foo1 but foo2[1].
@(foo1|foo2|...)  (foo1|foo2|...)  One of foo1 or foo2 or ...
     ?(foo)           (foo|)       Zero or one occurrences of foo.
     *(foo)           (foo)#       Zero or more occurrences of foo.
     +(foo)           (foo)##      One or more occurrences of foo.
----------------------------------------------------------------------

      The `^', `~' and `#' (but not `|')forms require EXTENDED_GLOB.
      From version 3.1.3, the ksh forms are fully supported when the
      option KSH_GLOB is in effect; for previous versions you
      must use the table above.

      [1] Note that `~' is the only globbing operator to have a lower
        precedence than `/'.  For example, `**/foo~*bar*' matches any
        file in a subdirectory called `foo', except where `bar'
        occurred somewhere in the path (e.g. `users/barstaff/foo' will
        be excluded by the `~' operator).  As the `**' operator cannot
        be grouped (inside parentheses it is treated as `*'), this is
        the way to exclude some subdirectories from matching a `**'.
    o   Unquoted assignments do file expansion after `:'s (intended for
        PATHs). 
    o   `integer' does not allow `-i'.
    o   `typeset' and `integer' have special behaviour for
        assignments in ksh, but not in zsh.  For example, this doesn't
        work in zsh:

          integer k=$(wc -l ~/.zshrc)

        because the return value from wc includes leading
        whitespace which causes wordsplitting.  Ksh handles the
        assignment specially as a single word.

  o  Command execution:

    o * There is no $ENV variable (use /etc/zshrc, ~/.zshrc; 
        note also $ZDOTDIR).
    o   $PATH is not searched for commands specified
        at invocation without -c.

  o  Aliases and functions:

    o   The order in which aliases and functions are defined is significant:
        function definitions with () expand aliases -- see question 2.3.
    o   Aliases and functions cannot be exported.
    o   There are no tracked aliases: command hashing replaces these.
    o   The use of aliases for key bindings is replaced by `bindkey'.
    o * Options are not local to functions (use LOCAL_OPTIONS; note this
        may always be unset locally to propagate options settings from a
        function to the calling level).
    o   Functions defined with `function funcname { body }' behave the
        same way as those defined with `funcname () { body }'.  In ksh,
        the former behave as if the body were read from a file with `.',
        and only the latter behave as true functions.

    o  Traps and signals:

    o * Traps are not local to functions.  The option LOCAL_TRAPS is
          available from 3.1.6.
    o   TRAPERR has become TRAPZERR (this was forced by UNICOS which
        has SIGERR).

  o  Editing:

    o   The options emacs, gmacs, viraw are not supported.
        Use bindkey to change the editing behaviour: `set -o {emacs,vi}'
        becomes `bindkey -{e,v}'; for gmacs, go to emacs mode and use
        `bindkey \^t gosmacs-transpose-characters'.
    o   The `keyword' option does not exist and `-k' is instead
        interactivecomments.  (`keyword' will not be in the next ksh
        release either.)
    o * Management of histories in multiple shells is different:
        the history list is not saved and restored after each command.
        The option SHARE_HISTORY appeared in 3.1.6 and is set in ksh
        compatibility mode to remedy this.
    o   `\' does not escape editing chars (use `^V').
    o   Not all ksh bindings are set (e.g. `<ESC>#'; try `<ESC>q').
    o * `#' in an interactive shell is not treated as a comment by
        default. 

  o  Built-in commands:

    o   Some built-ins (r, autoload, history, integer ...)
        were aliases in ksh. 
    o   There is no built-in command newgrp: use e.g. `alias
        newgrp="exec newgrp"'
    o   `jobs' has no `-n' flag.
    o   `read' has no `-s' flag.

  o  Other idiosyncrasies:

    o   `select' always redisplays the list of selections on each loop.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- zshfaq.yo	2002/03/24 19:23:57	1.78
+++ zshfaq.yo	2002/04/24 21:09:46	1.79
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/03/24)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/04/24)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/03/24
+mydit(Last-Modified:) 2002/04/24
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,8 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(2.3)   More description about alias pitfalls.
+  mydit(passim) Be more explicit about how to set options.
+  mydit(1.7)    More care about infinite loops exec'ing zsh.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -448,9 +449,12 @@
   If you have zsh in a subdirectory mytt(bin) of your home directory,
   put this in .profile:
   verb(
-    [ -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l
+    [ x$ZSH_VERSION = x -a -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l
   )
-  or if your login shell is csh or tcsh, put this in .login:
+  --- the first test is a safeguard to avoid an infinite loop in case
+  your zsh is set up to source your tt(.profile), which is quite a common
+  trick as you can save a lot of duplication that way.  If your login
+  shell is csh or tcsh, put this in .login:
   verb(
     if ( -f ~/bin/zsh ) exec ~/bin/zsh -l
   )
@@ -510,6 +514,12 @@
 sect(Differences from sh and ksh)
 label(21)
 
+  (The following refers to shell options extensively.  To turn an
+  option on in zsh you use `tt(setopt) var(optionname)', and to turn
+  it off you use `tt(unsetopt) var(optionname)'.  The option name is
+  case insensitive and underscores are ignored.  If you are used to ksh,
+  that syntax works too.)
+
   Most features of ksh (and hence also of sh) are implemented in zsh;
   problems can arise because the implementation is slightly different.
   Note also that not all ksh's are the same either.  I have based this
@@ -1496,14 +1506,14 @@
   substitution then sets a default to which later history substitutions
   with single unqualified bangs refer, so that !$ becomes equivalent to
   tt(!-2:$).  The option tt(CSH_JUNKIE_HISTORY) makes all single bangs refer
-  to the last command.
+  to the last command (`tt(setopt cshjunkiehistory)' to turn it on).
 
 
 sect(Why does zsh kill off all my background jobs when I logout?)
 
   Simple answer: you haven't asked it not to.  Zsh (unlike [t]csh) gives
-  you the option of having background jobs killed or not: the mytt(nohup)
-  option exists if you don't want them killed.  Note that you can always
+  you the option of having background jobs killed or not: `tt(setopt nohup)'
+  if you don't want them killed.  Note that you can always
   run programs with mytt(nohup) in front of the pipeline whether or not the
   option is set, which will prevent that job from being killed on
   logout.  (mytt(nohup) is actually an external command.)
@@ -1746,7 +1756,7 @@
   to both files when the redirector appears twice.  What's going on in the
   first example is exactly the same, however the second redirector is
   disguised as a pipe.  So if you want to turn this effect off, you need
-  to unset the option mytt(MULTIOS).
+  to `tt(unsetopt multios)'.
 
 sect(Why am I prompted to correct commands which are in my path?)
 
@@ -1874,7 +1884,8 @@
 
   Often there will be more than one possible completion: two files
   start with the same characters, for example.  Zsh has a lot of
-  flexibility for what it does here via its options.  The default is
+  flexibility for what it does here via its options (use `tt(setopt)
+  var(optioname)' to turn an option on).  The default is
   for it to beep and completion to stop until you type another
   character.  You can type tt(\C-D) to see all the possible completions.
   (That's assuming you're at the end of the line, otherwise tt(\C-D) will
@@ -1915,7 +1926,7 @@
   in zsh, it will simply go to the end of the word and try to complete
   there.  However, there are two ways of changing this.
 
-  First, there is the option COMPLETE_IN_WORD.  This tries to fill in
+  First, you can `tt(setopt complete_in_word)'.  This tries to fill in
   the word at the point of the cursor.  For example, if the current
   directory contains mytt(foobar), then with the option set, you can
   complete mytt(fbar) to mytt(foobar) by moving the cursor to the


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-02-24 13:53 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-02-24 13:53 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/02/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.6   Modified list of FTP mirrors (from Geoff Wing).

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

1.6: Where do I get it?

  The coordinator of development is currently me; the alias
  coordinator@zsh.org can be used to contact whoever is in the hot
  seat.  The following are known mirrors (kept frequently up to date); the
  first is the official archive site, currently in Australia.  All are
  available by anonymous FTP.  The major sites keep test versions in the
  `testing' subdirectory: such up-to-the-minute development versions should
  only be retrieved if you actually plan to help test the latest version of
  the shell.  The following list also appears on the WWW at
  http://www.zsh.org .

    Home site ftp://ftp.zsh.org
              http://www.zsh.org/pub/zsh/
    Denmark   ftp://sunsite.dk/pub/unix/shells/zsh
    Finland   ftp://ftp.funet.fi/pub/unix/shells/zsh/
    Germany   ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/
    Hungary   ftp://ftp.cs.elte.hu/pub/zsh/
              (also http://www.cs.elte.hu/pub/zsh/ )
              ftp://ftp.kfki.hu/pub/packages/zsh/
    Israel    ftp://ftp.math.technion.ac.il/pub/zsh/
              (also http://www.math.technion.ac.il/pub/zsh/ )
    Japan     ftp://ftp.win.ne.jp/pub/shell/zsh/
              ftp://ftp.ayamura.org/pub/zsh/
    Korea     ftp://linux.sarang.net/mirror/system/shell/zsh/
    Netherlands ftp://ftp.demon.nl/pub/mirrors/zsh/
    Norway    ftp://ftp.uit.no/pub/unix/shells/zsh/
    Poland    ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/
    Romania   ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/
              ftp://ftp.kappa.ro/pub/mirrors/ftp.zsh.org/pub/zsh/
    Slovenia  ftp://ftp.siol.net/mirrors/zsh/
    Sweden    ftp://ftp.lysator.liu.se/pub/unix/zsh/
    UK        ftp://ftp.net.lut.ac.uk/zsh/
              (also by FSP at port 21)
              ftp://sunsite.org.uk/packages/zsh/
    USA       ftp://uiarchive.uiuc.edu/mirrors/ftp/ftp.zsh.org/pub/
              ftp://ftp.rge.com/pub/shells/zsh/
              http://zsh.disillusion.org/
              http://foad.org/zsh/

  The Windows port mentioned above is maintained separately by Amol
  Deshpande <amold@microsoft.com>; please mail Amol directly about any
  Windows-specific problems.  This is based on 3.0.5, and probably will
  not be developed further.  You can get it from:

            ftp://ftp.blarg.net/users/amol/zsh  

  There is no port of 4.0 for Windows, but newer releases compile under
  Cygwin, a freely available UNIX-style environment for the Win32 API.  You
  can find information about this at 
  http://sourceware.cygnus.com/cygwin.

  Likewise the OS/2 port is available from TAMURA Kent
  <kent@tril.ibm.co.jp> at

            http://www.haun.org/kent/tmp/

  Starting from mid-October 1997, there is an archive of patches sent
  to the maintainers' mailing list.  Note that these may not all be
  added to the shell, and some may already have been; you simply have
  to search for something you might want which is not in the version
  you have.  Also, there may be some prerequisites earlier in the
  archive.  It can be found on the zsh WWW pages (as described in
  1.1) at:

            http://zsh.sunsite.dk/Patches/

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.73
diff -u -r1.73 zshfaq.yo
--- zshfaq.yo	2002/01/23 22:03:09	1.73
+++ zshfaq.yo	2002/02/24 13:50:17
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/01/23)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/02/24)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2002/01/23
+mydit(Last-Modified:) 2002/02/24
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(3.27)  New item: commands which can be executed but are not visible.
+  mydit(1.6)   Modified list of FTP mirrors (from Geoff Wing).
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -343,36 +343,30 @@
     mydit(Home site) url(ftp://ftp.zsh.org)(ftp://ftp.zsh.org)
     mydit()          url(http://www.zsh.org/pub/zsh/)
 (http://www.zsh.org/pub/zsh/)
-    mydit(Australia) url(ftp://ftp.ips.gov.au/mirror/zsh/)
-(ftp://ftp.ips.gov.au/mirror/zsh/)
     mydit(Denmark)   url(ftp://sunsite.dk/pub/unix/shells/zsh)
 (ftp://sunsite.dk/pub/unix/shells/zsh)
     mydit(Finland)   url(ftp://ftp.funet.fi/pub/unix/shells/zsh/)
 (ftp://ftp.funet.fi/pub/unix/shells/zsh/)
-    mydit(France)    url(ftp://ftp.cenatls.cena.dgac.fr/shells/zsh/)
-(ftp://ftp.cenatls.cena.dgac.fr/shells/zsh/)
     mydit(Germany)   url(ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/)
 (ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/)
-    mydit()          url(ftp://ftp.uni-trier.de/pub/unix/shell/zsh/)
-(ftp://ftp.uni-trier.de/pub/unix/shell/zsh/)
     mydit(Hungary)   url(ftp://ftp.cs.elte.hu/pub/zsh/)
 (ftp://ftp.cs.elte.hu/pub/zsh/)
     mydit()          (also url(http://www.cs.elte.hu/pub/zsh/)
 (http://www.cs.elte.hu/pub/zsh/) )
     mydit()          url(ftp://ftp.kfki.hu/pub/packages/zsh/)
 (ftp://ftp.kfki.hu/pub/packages/zsh/)
-    mydit(Israel)    \
-url(ftp://ftp.math.technion.ac.il/pub/zsh/)
+    mydit(Israel)    url(ftp://ftp.math.technion.ac.il/pub/zsh/)
 (ftp://ftp.math.technion.ac.il/pub/zsh/)
-    mydit()          \
-url(http://www.math.technion.ac.il/pub/zsh/)
-(http://www.math.technion.ac.il/pub/zsh/)
-    mydit(Italy)     url(ftp://ftp.unina.it/pub/Unix/pkgs/shell/zsh/)
-(ftp://ftp.unina.it/pub/Unix/pkgs/shell/zsh/)
-    mydit(Japan)     url(ftp://ftp.nisiq.net/pub/shells/zsh/)
-(ftp://ftp.nis.co.jp/pub/shells/zsh/)
-    mydit()          url(ftp://ftp.win.ne.jp/pub/shell/zsh/)
+    mydit()          (also url(http://www.math.technion.ac.il/pub/zsh/)
+(http://www.math.technion.ac.il/pub/zsh/) )
+    mydit(Japan)     url(ftp://ftp.win.ne.jp/pub/shell/zsh/)
 (ftp://ftp.win.ne.jp/pub/shell/zsh/)
+    mydit()          url(ftp://ftp.ayamura.org/pub/zsh/)
+(ftp://ftp.ayamura.org/pub/zsh/)
+    mydit(Korea)     url(ftp://linux.sarang.net/mirror/system/shell/zsh/)
+(ftp://linux.sarang.net/mirror/system/shell/zsh/)
+    mydit(Netherlands) url(ftp://ftp.demon.nl/pub/mirrors/zsh/)
+(ftp://ftp.demon.nl/pub/mirrors/zsh/)
     mydit(Norway)    url(ftp://ftp.uit.no/pub/unix/shells/zsh/)
 (ftp://ftp.uit.no/pub/unix/shells/zsh/)
     mydit(Poland)    url(ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/)
@@ -390,12 +384,12 @@
     mydit()          (also by FSP at port 21)
     mydit()          url(ftp://sunsite.org.uk/packages/zsh/)
 (ftp://sunsite.org.uk/packages/zsh/)
-    mydit(USA)       url(ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/)
-(ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/)
+    mydit(USA)       url(ftp://uiarchive.uiuc.edu/mirrors/ftp/ftp.zsh.org/pub/)
+(ftp://uiarchive.uiuc.edu/mirrors/ftp/ftp.zsh.org/pub/)
     mydit()          url(ftp://ftp.rge.com/pub/shells/zsh/)
 (ftp://ftp.rge.com/pub/shells/zsh/)
-    mydit()          url(ftp://foad.org/pub/zsh/)
-(ftp://foad.org/pub/zsh/)
+    mydit()          url(http://zsh.disillusion.org/)
+(http://zsh.disillusion.org/)
     mydit()          url(http://foad.org/zsh/)
 (http://foad.org/zsh/)
   )


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2002-01-23 22:09 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2002-01-23 22:09 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.





Archive-Name: unix-faq/shell/zsh
Last-Modified: 2002/01/23
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  3.27  New item: commands which can be executed but are not visible.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?
3.27. Why am I prompted to correct commands which are in my path?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

3.27: Why am I prompted to correct commands which are in my path?

(Or, if you know about the command hash table, the command isn't in the
table even though you know it works --- it's the same basic problem.)

It occasionally happens that a directory in your path is not readable,
although files in it have `execute' permission.  Then the system can
execute them, but the shell can't see them when it scans the path, since
it does that by trying to read the directory.  If this is the case, you
may find `which var(cmd)' does find the command, since then the
shell checks the path explicitly for that one command rather than
looking for all files in the directory.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- zshfaq.yo	2001/12/21 17:14:16	1.72
+++ zshfaq.yo	2002/01/23 22:03:09	1.73
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/12/21)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2002/01/23)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/12/21
+mydit(Last-Modified:) 2002/01/23
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(   )  None.
+  mydit(3.27)  New item: commands which can be executed but are not visible.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -121,6 +121,7 @@
 3.24. What's wrong with cut and paste on my xterm?
 3.25. How do I get coloured prompts on my colour xterm?
 3.26. Why is my output duplicated with `tt(foo 2>&1 >foo.out | bar)'?
+3.27. Why am I prompted to correct commands which are in my path?
 
 Chapter 4:  The mysteries of completion
 4.1. What is completion?
@@ -1746,6 +1747,19 @@
   first example is exactly the same, however the second redirector is
   disguised as a pipe.  So if you want to turn this effect off, you need
   to unset the option mytt(MULTIOS).
+
+sect(Why am I prompted to correct commands which are in my path?)
+
+(Or, if you know about the command hash table, the command isn't in the
+table even though you know it works --- it's the same basic problem.)
+
+It occasionally happens that a directory in your path is not readable,
+although files in it have `execute' permission.  Then the system can
+execute them, but the shell can't see them when it scans the path, since
+it does that by trying to read the directory.  If this is the case, you
+may find `tt(which )var(cmd)' does find the command, since then the
+shell checks the path explicitly for that one command rather than
+looking for all files in the directory.
 
 
 chapter(The mysteries of completion)


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-12-21 17:17 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-12-21 17:17 UTC (permalink / raw)
  To: zsh-users

[I'm now away till early January, too --- pws]

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.




Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/12/21
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

       None.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

No changes this time.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- zshfaq.yo	2001/11/25 16:39:50	1.71
+++ zshfaq.yo	2001/12/21 17:14:16	1.72
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/11/25)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/12/21)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/11/25
+mydit(Last-Modified:) 2001/12/21
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-11-25 16:43 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-11-25 16:43 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.




Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/11/25
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

       None.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

No changes this time.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- zshfaq.yo	2001/10/28 19:24:47	1.70
+++ zshfaq.yo	2001/11/25 16:39:50	1.71
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/09/28)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/11/25)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/09/28
+mydit(Last-Modified:) 2001/11/25
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(1.5)  4.0.4 has been released.
+  mydit(   )  None.
 )
 
 This document contains a list of frequently-asked (or otherwise


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-10-28 19:35 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-10-28 19:35 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/09/28
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.5  4.0.4 has been released.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

1.5: What's the latest version?

  Zsh 4.0.4 is the latest production version.  The major number 4.0
  reflects major improvements to modularity and to improvements in
  the editor, programmable completion and many other smaller features
  over the 3.0 series.  (The previous widely available release was
  4.0.2.)

  There will not be any further 3.0 releases now that 4.0 has become
  the stable version.  However, a few patches to 3.0.8 are available from
  the patch manager at Sourceforge, http://sourceforge.net/patch/?group_id=4068
  Official patches are posted by Bart Schaefer (user name barts).

  A beta of the next version is often available.  Development of zsh is
  patch by patch, with each intermediate version publicly available.  Note
  that this `open' development system does mean bugs are sometimes
  introduced into the most recent archived version.  These are usually
  fixed quickly.  If you are really interested in getting the latest
  improvements, and less worried about providing a stable environment,
  development versions are uploaded quite frequently to the archive in the
  development subdirectory.

  Note also that as the shell changes, it may become incompatible with
  older versions; see the end of question 5.1 for a partial list.
  Changes of this kind are almost always forced by an awkward or
  unnecessary feature in the original design (as perceived by current
  users), or to enhance compatibility with other Bourne shell
  derivatives, or (mostly in the 3.0 series) to provide POSIX compliancy.


--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- zshfaq.yo	2001/09/24 20:34:23	1.69
+++ zshfaq.yo	2001/10/28 19:24:47	1.70
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/09/24)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/09/28)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/09/24
+mydit(Last-Modified:) 2001/09/28
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,8 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(1.1)  Web address of Zsh information pages changed.
-  mydit(1.7)  Making zsh your login shell, e-mail discussion.
+  mydit(1.5)  4.0.4 has been released.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -296,10 +295,11 @@
 
 sect(What's the latest version?)
 
-  Zsh 4.0.2 is the latest production version.  The major number 4.0
+  Zsh 4.0.4 is the latest production version.  The major number 4.0
   reflects major improvements to modularity and to improvements in
   the editor, programmable completion and many other smaller features
-  over the 3.0 series.
+  over the 3.0 series.  (The previous widely available release was
+  4.0.2.)
 
   There will not be any further 3.0 releases now that 4.0 has become
   the stable version.  However, a few patches to 3.0.8 are available from


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-09-24 21:44 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-09-24 21:44 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.


Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/09/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.1  Web address of Zsh information pages changed.
  1.7  Making zsh your login shell, e-mail discussion.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://zsh.sunsite.dk/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://zsh.sunsite.dk/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://zsh.sunsite.dk/FAQ/zshfaq.yo and the plain text version
  can be found at http://zsh.sunsite.dk/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This is now more than half complete and includes a discussion of
  the new form for command line completion, not described in the FAQ.
  You can find it in various formats at:
    http://zsh.sunsite.dk/Guide/

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

1.7: I don't have root access: how do I make zsh my login shell?

  Unfortunately, on many machines you can't use `chsh' to change your
  shell unless the name of the shell is contained in /etc/shells, so if
  you have your own copy of zsh you need some sleight-of-hand to use it
  when you log on.  (Simply typing `zsh' is not really a solution since
  you still have your original login shell waiting for when you exit.)

  The basic idea is to use `exec <zsh-path>' to replace the current
  shell with zsh.  Often you can do this in a login file such as .profile 
  (if your shell is sh or ksh) or .login (if it's csh).  Make sure you
  have some way of altering the file (e.g. via FTP) before you try this as
  `exec' is often rather unforgiving. 

  If you have zsh in a subdirectory `bin' of your home directory,
  put this in .profile:

    [ -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l

  or if your login shell is csh or tcsh, put this in .login:

    if ( -f ~/bin/zsh ) exec ~/bin/zsh -l

  (in each case the `-l' tells zsh it is a login shell).

  If you want to check this works before committing yourself to it,
  you can make the login shell ask whether to exec zsh.  The following
  work for Bourne-like shells:

    [ -f $HOME/bin/zsh ] && {
            echo "Type Y to run zsh: \c"
            read line
            [ "$line" = Y ] && exec $HOME/bin/zsh -l
    }

  and for C-shell-like shells:

    if ( -f ~/bin/zsh ) then
            echo -n "Type Y to run zsh: "
            if ( "$<" == Y ) exec ~/bin/zsh -l
    endif

  It's not a good idea to put this (even without the -l) into .cshrc,
  at least without some tests on what the csh is supposed to be doing,
  as that will cause _every_ instance of csh to turn into a zsh and
  will cause csh scripts (yes, unfortunately some people write these)
  which do not call `csh -f' to fail.  If you want to tell xterm to
  run zsh, change the SHELL environment variable to the full path of
  zsh at the same time as you exec zsh (in fact, this is sensible for
  consistency even if you aren't using xterm).  If you have to exec
  zsh from your .cshrc, a minimum safety check is `if ($?prompt) exec
  zsh'.

  If you like your login shell to appear in the process list as `-zsh',
  you can link `zsh' to `-zsh' (e.g. by `ln -s ~/bin/zsh 
  ~/bin/-zsh') and change the exec to `exec -zsh'.  (Make sure
  `-zsh' is in your path.) This has the same effect as the `-l'
  option. 

  There was a thread on this topic on the zsh-workers mailing list,
  starting from item 15747.  You can find this at http://www.zsh.org/mla/.

  Footnote: if you DO have root access, make sure zsh goes in
  /etc/shells on all appropriate machines, including NIS clients, or you
  may have problems with FTP to that machine.


--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- zshfaq.yo	2001/08/27 17:58:18	1.68
+++ zshfaq.yo	2001/09/24 20:34:23	1.69
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/08/27)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/09/24)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/08/27
+mydit(Last-Modified:) 2001/09/24
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,7 +55,8 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit()     No changes (it's August).
+  mydit(1.1)  Web address of Zsh information pages changed.
+  mydit(1.7)  Making zsh your login shell, e-mail discussion.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -148,21 +149,21 @@
 label(11)
 
   Information on zsh is available via the World Wide Web.  The URL
-  is url(http://sunsite.dk/zsh/)(http://sunsite.dk/zsh/) .
+  is url(http://zsh.sunsite.dk/)(http://zsh.sunsite.dk/) .
   The server provides this FAQ and much else and is
   now maintained by Karsten Thygesen and others (mail \
   email(zsh@sunsite.dk)
   with any related messages).  The FAQ is at \
-url(http://sunsite.dk/zsh/FAQ/)(http://sunsite.dk/zsh/FAQ/) .
+url(http://zsh.sunsite.dk/FAQ/)(http://zsh.sunsite.dk/FAQ/) .
   The site also contains some contributed zsh scripts and functions;
   we are delighted to add more, or simply links to your own collection.
 
   This document was originally written in YODL, allowing it to be converted
   easily into various other formats.  The master source file lives at
-  url(http://sunsite.dk/zsh/FAQ/zshfaq.yo)
-(http://sunsite.dk/zsh/FAQ/zshfaq.yo) and the plain text version
-  can be found at url(http://sunsite.dk/zsh/FAQ/zshfaq.txt)
-(http://sunsite.dk/zsh/FAQ/zshfaq.txt) .
+  url(http://zsh.sunsite.dk/FAQ/zshfaq.yo)
+(http://zsh.sunsite.dk/FAQ/zshfaq.yo) and the plain text version
+  can be found at url(http://zsh.sunsite.dk/FAQ/zshfaq.txt)
+(http://zsh.sunsite.dk/FAQ/zshfaq.txt) .
 
   Another useful source of information is the collection of FAQ articles
   posted frequently to the Usenet news groups comp.unix.questions,
@@ -190,13 +191,10 @@
 
   I have been putting together a user guide to complement the manual by
   explaining the most useful features of zsh in a more easy to read way.
-  This will be a long project, but a partial version describing how to
-  write startup files and how to use the new, more powerful, form for
-  completion which first appeared in 3.1.6 (and is not described in this
-  FAQ) can be seen by looking at
-    url(http://www.pwstephenson.fsnet.co.uk/computing/)
-(http://www.pwstephenson.fsnet.co.uk/computing/)
-  where it exists in various formats.
+  This is now more than half complete and includes a discussion of
+  the new form for command line completion, not described in the FAQ.
+  You can find it in various formats at:
+    url(http://zsh.sunsite.dk/Guide/)(http://zsh.sunsite.dk/Guide/)
 
   (As a method of reading the following in Emacs, you can type tt(\M-2
   \C-x $) to make all the indented text vanish, then tt(\M-0 \C-x $)
@@ -434,8 +432,8 @@
   link(1.1)(11)) at:
 
   description(
-    mydit()        url(http://sunsite.dk/zsh/Patches/)
-(http://sunsite.dk/zsh/Patches/)
+    mydit()        url(http://zsh.sunsite.dk/Patches/)
+(http://zsh.sunsite.dk/Patches/)
   )
      
 sect(I don't have root access: how do I make zsh my login shell?)
@@ -498,6 +496,10 @@
   mytt(-zsh) is in your path.) This has the same effect as the mytt(-l)
   option. 
 
+  There was a thread on this topic on the zsh-workers mailing list,
+  starting from item 15747.  You can find this at url(http://www.zsh.org/mla/)\
+(http://www.zsh.org/mla/).
+
   Footnote: if you DO have root access, make sure zsh goes in
   /etc/shells on all appropriate machines, including NIS clients, or you
   may have problems with FTP to that machine.
@@ -2351,4 +2353,4 @@
 however, that this document changes monthly and it may be more useful
 to provide a pointer to it rather than the entire text.  A suitable
 pointer is "information on the Z-shell can be obtained on the World
-Wide Web at URL http://sunsite.dk/zsh/".
+Wide Web at URL http://zsh.sunsite.dk/".


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-08-27 19:08 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-08-27 19:08 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/07/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.5  4.0.2 really released.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://sunsite.dk/zsh/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://sunsite.dk/zsh/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://sunsite.dk/zsh/FAQ/zshfaq.yo and the plain text version
  can be found at http://sunsite.dk/zsh/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This will be a long project, but a partial version describing how to
  write startup files and how to use the new, more powerful, form for
  completion which first appeared in 3.1.6 (and is not described in this
  FAQ) can be seen by looking at
    http://www.pwstephenson.fsnet.co.uk/computing/
  where it exists in various formats.

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.

No changes this month.

--- End of changed items, diff from previous version follows ---


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-07-24 22:14 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-07-24 22:14 UTC (permalink / raw)
  To: zsh-users

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.



Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/07/24
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.5  4.0.2 really released.

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://sunsite.dk/zsh/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://sunsite.dk/zsh/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://sunsite.dk/zsh/FAQ/zshfaq.yo and the plain text version
  can be found at http://sunsite.dk/zsh/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This will be a long project, but a partial version describing how to
  write startup files and how to use the new, more powerful, form for
  completion which first appeared in 3.1.6 (and is not described in this
  FAQ) can be seen by looking at
    http://www.pwstephenson.fsnet.co.uk/computing/
  where it exists in various formats.

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.


1.5: What's the latest version?

  Zsh 4.0.2 is the latest production version.  The major number 4.0
  reflects major improvements to modularity and to improvements in
  the editor, programmable completion and many other smaller features
  over the 3.0 series.

  There will not be any further 3.0 releases now that 4.0 has become
  the stable version.  However, a few patches to 3.0.8 are available from
  the patch manager at Sourceforge, http://sourceforge.net/patch/?group_id=4068
  Official patches are posted by Bart Schaefer (user name barts).

  A beta of the next version is often available.  Development of zsh is
  patch by patch, with each intermediate version publicly available.  Note
  that this `open' development system does mean bugs are sometimes
  introduced into the most recent archived version.  These are usually
  fixed quickly.  If you are really interested in getting the latest
  improvements, and less worried about providing a stable environment,
  development versions are uploaded quite frequently to the archive in the
  development subdirectory.

  Note also that as the shell changes, it may become incompatible with
  older versions; see the end of question 5.1 for a partial list.
  Changes of this kind are almost always forced by an awkward or
  unnecessary feature in the original design (as perceived by current
  users), or to enhance compatibility with other Bourne shell
  derivatives, or (mostly in the 3.0 series) to provide POSIX compliancy.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.65
retrieving revision 1.67
diff -u -r1.65 -r1.67
--- zshfaq.yo	2001/06/25 20:08:41	1.65
+++ zshfaq.yo	2001/07/24 21:08:36	1.67
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/06/25)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/07/24)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/06/25
+mydit(Last-Modified:) 2001/07/24
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,8 +55,7 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit(1.6)  4.0.2 nearly released.
-  mydit(3.1)  typeset splitting incompatibility and tt(KSH_TYPESET) option
+  mydit(1.5)  4.0.2 really released.
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -299,15 +298,11 @@
 
 sect(What's the latest version?)
 
-  Zsh 4.0.2 is the latest production version.
+  Zsh 4.0.2 is the latest production version.  The major number 4.0
+  reflects major improvements to modularity and to improvements in
+  the editor, programmable completion and many other smaller features
+  over the 3.0 series.
 
-  Zsh 3.0.8 was the previous production version.  The major number 3.0
-  largely reflected considerable internal changes in zsh to make it more
-  reliable, consistent and (where possible) compatible.  Those planning on
-  upgrading their zsh installation should take a look at the list of
-  incompatibilities at the end of link(5.1)(51).  This is longer than usual
-  due to enhanced sh, ksh and POSIX compatibility.
-
   There will not be any further 3.0 releases now that 4.0 has become
   the stable version.  However, a few patches to 3.0.8 are available from
   the patch manager at Sourceforge, \
@@ -2345,8 +2340,8 @@
 
 nsect(Copyright Information:)
 
-This document is copyright (C) P.W. Stephenson, 1995, 1996, 1997,
-1998, 1999, 2000. This text originates in the U.K. and the author asserts
+This document is copyright (C) P.W. Stephenson, 1995 -- 2001.
+This text originates in the U.K. and the author asserts
 his moral rights under the Copyrights, Designs and Patents Act, 1988.
 
 Permission is hereby granted, without written agreement and without


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Z-Shell (zsh) FAQ changes this month
@ 2001-06-25 21:14 Peter Stephenson
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Stephenson @ 2001-06-25 21:14 UTC (permalink / raw)
  To: zsh-users

[This has been doctored for 4.0.2, which should appear in the next couple
of days.  I am too lazy to back port it to 4.0.1 --- pws]

This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
yodl version of the FAQ.  If you would like a complete individual
copy, email me and I will add you to the list.


Archive-Name: unix-faq/shell/zsh
Last-Modified: 2001/06/25
Submitted-By: pws@pwstephenson.fsnet.co.uk (Peter Stephenson)
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--2001 (see end of document)

Changes since last issue posted:

  1.6  4.0.2 nearly released.
  3.1  typeset splitting incompatibility and KSH_TYPESET option

This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access.  Zsh is among the most powerful freely available Bourne-like
shell for interactive use.

If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.

If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.

Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.

Contents:
Chapter 1:  Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run?  (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?

Chapter 2:  How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work?  (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?

Chapter 3:  How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
3.25. How do I get coloured prompts on my colour xterm?
3.26. Why is my output duplicated with `foo 2>&1 >foo.out | bar'?

Chapter 4:  The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?

Chapter 5:  The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Did zsh have problems in the year 2000?

Acknowledgments

Copyright
--- End of Contents ---

Chapter 1: Introducing zsh and how to install it

1.1: Sources of information

  Information on zsh is available via the World Wide Web.  The URL
  is http://sunsite.dk/zsh/ .
  The server provides this FAQ and much else and is
  now maintained by Karsten Thygesen and others (mail zsh@sunsite.dk
  with any related messages).  The FAQ is at http://sunsite.dk/zsh/FAQ/ .
  The site also contains some contributed zsh scripts and functions;
  we are delighted to add more, or simply links to your own collection.

  This document was originally written in YODL, allowing it to be converted
  easily into various other formats.  The master source file lives at
  http://sunsite.dk/zsh/FAQ/zshfaq.yo and the plain text version
  can be found at http://sunsite.dk/zsh/FAQ/zshfaq.txt .

  Another useful source of information is the collection of FAQ articles
  posted frequently to the Usenet news groups comp.unix.questions,
  comp.unix.shells and comp.answers with answers to general questions
  about UNIX.  The fifth of the seven articles deals with shells,
  including zsh, with a brief description of differences.  There is
  also a separate FAQ on shell differences and how to change your
  shell.  Usenet FAQs are available via FTP from rtfm.mit.edu and
  mirrors and also on the World Wide Web; see

    USA         http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
    UK          http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
    Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html

  You can also get it via email by emailing mail-server@rtfm.mit.edu
  with, in the body of the message, `send faqs/unix-faq/shell/zsh'.

  The latest version of this FAQ is also available directly from any
  of the zsh archive sites listed in question 1.6.

  I have been putting together a user guide to complement the manual by
  explaining the most useful features of zsh in a more easy to read way.
  This will be a long project, but a partial version describing how to
  write startup files and how to use the new, more powerful, form for
  completion which first appeared in 3.1.6 (and is not described in this
  FAQ) can be seen by looking at
    http://www.pwstephenson.fsnet.co.uk/computing/
  where it exists in various formats.

  (As a method of reading the following in Emacs, you can type \M-2
  \C-x $ to make all the indented text vanish, then \M-0 \C-x $
  when you are on the title you want.)

  For any more eclectic information, you should contact the mailing
  list:  see question 5.2.

--- End of general information, changed items follow in full ---

Minor changes of phrasing, spelling, etc. are not included.


3.1: Why does `$var' where `var="foo bar"' not do what I expect?

  In most Bourne-shell derivatives, multiple-word variables such as

    var="foo bar"

  are split into words when passed to a command or used in a `for foo in
  $var' loop.  By default, zsh does not have that behaviour: the
  variable remains intact.  (This is not a bug!  See below.)  The option
  SH_WORD_SPLIT exists to provide compatibility.

  For example, defining the function args to show the number of its
  arguments:

    args() { echo $#; }

  and with our definition of `var',

    args $var

  produces the output `1'.  After

    setopt shwordsplit

  the same function produces the output `2', as with sh and ksh.

  Unless you need strict sh/ksh compatibility, you should ask yourself
  whether you really want this behaviour, as it can produce unexpected
  effects for variables with entirely innocuous embedded spaces.  This
  can cause horrendous quoting problems when invoking scripts from
  other shells.  The natural way to produce word-splitting behaviour
  in zsh is via arrays.  For example,

    set -A array one two three twenty

  (or

    array=(one two three twenty)

  if you prefer), followed by

    args $array

  produces the output `4', regardless of the setting of SH_WORD_SPLIT.
  Arrays are also much more versatile than single strings.  Probably
  if this mechanism had always been available there would never have
  been automatic word splitting in scalars, which is a sort of
  uncontrollable poor man's array.

  Note that this happens regardless of the value of the internal field
  separator, $IFS; in other words, with `IFS=:; foo=a:b; args $foo'
  you get the answer 1.

  Other ways of causing word splitting include a judicious use of
  `eval':

    sentence="Longtemps, je me suis couch\\'e de bonne heure."
    eval "words=($sentence)"

  after which $words is an array with the words of $sentence (note
  characters special to the shell, such as the `'' in this example,
  must already be quoted), or, less standard but more reliable,
  turning on SH_WORD_SPLIT for one variable only:

    args ${=sentence}

  always returns 8 with the above definition of `args'.  (In older
  versions of zsh, ${=foo} toggled SH_WORD_SPLIT; now it forces it on.)

  Note also the "$@" method of word splitting is always available in zsh
  functions and scripts (though strictly this does array splitting, not
  word splitting).  This is more portable than the $*, since it
  will work regardless of the SH_WORD_SPLIT setting; the other
  difference is that $* removes empty arguments from the array.
  You can fix the first half of that objection by using ${==*},
  which turns off SH_WORD_SPLIT for the duration of the expansion.

  SH_WORD_SPLIT is set when zsh is invoked with the names `ksh' or `sh',
  or (entirely equivalent) when `emulate ksh' or `emulate sh' is in
  effect.

  There is one other effect of word splitting which differs between ksh
  and zsh.  In ksh, the builtin commands that declare parameters such
  as typeset and export force word-splitting not to take place
  after on an assignment argument:

    typeset param=`echo foo bar`

  in ksh will create a parameter with value `foo bar', but in zsh will
  create a parameter param with value foo and a parameter bar
  whose value is empty.  Contrast this with a normal assignment (no
  typeset or other command in front), which never causes a word split
  unless you have GLOB_ASSIGN set.  From zsh version 4.0.2 the option
  KSH_TYPESET, set automatically in compatibility mode, fixes this
  problem.  Note that in bash this behaviour occurs with all arguments that
  look like assignments, whatever the command name; to get this behaviour
  in zsh you have to set the option MAGIC_EQUAL_SUBST.

--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- zshfaq.yo	2001/05/24 21:11:12	1.64
+++ zshfaq.yo	2001/06/25 20:08:41	1.65
@@ -43,11 +43,11 @@
 whenman(report(ARG1)(ARG2)(ARG3))\
 whenms(report(ARG1)(ARG2)(ARG3))\
 whensgml(report(ARG1)(ARG2)(ARG3)))
-myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/05/25)
+myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2001/06/25)
 COMMENT(-- the following are for Usenet and must appear first)\
 description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 2001/05/24
+mydit(Last-Modified:) 2001/06/25
 mydit(Submitted-By:) email(pws@pwstephenson.fsnet.co.uk (Peter Stephenson))
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--2001 (see end of document)
@@ -55,8 +55,8 @@
 
 bf(Changes since last issue posted:)
 description(
-  mydit()     Nothing substantive, but many minor tweaks in preparation for
-       the release of 4.0.1.
+  mydit(1.6)  4.0.2 nearly released.
+  mydit(3.1)  typeset splitting incompatibility and tt(KSH_TYPESET) option
 )
 
 This document contains a list of frequently-asked (or otherwise
@@ -299,7 +299,7 @@
 
 sect(What's the latest version?)
 
-  Zsh 4.0.1 is the latest production version.
+  Zsh 4.0.2 is the latest production version.
 
   Zsh 3.0.8 was the previous production version.  The major number 3.0
   largely reflected considerable internal changes in zsh to make it more
@@ -586,7 +586,7 @@
         subscripts start at 1, not 0; tt(array[0]) refers to tt(array[1]);
         mytt($array) refers to the whole array, not tt($array[0]);
         braces are unnecessary: tt($a[1] == ${a[1]}), etc.
-        The tt(KSH_ARRAYS) option is now available.
+        Set the tt(KSH_ARRAYS) option for compatibility.
     it()  Coprocesses are established by mytt(coproc); mytt(|&) behaves like
         csh.  Handling of coprocess file descriptors is also different.
     it()  In mytt(cmd1 && cmd2 &), only mytt(cmd2) instead of the whole
@@ -1036,6 +1036,22 @@
   or (entirely equivalent) when mytt(emulate ksh) or mytt(emulate sh) is in
   effect.
 
+  There is one other effect of word splitting which differs between ksh
+  and zsh.  In ksh, the builtin commands that declare parameters such
+  as tt(typeset) and tt(export) force word-splitting not to take place
+  after on an assignment argument:
+  verb(
+    typeset param=`echo foo bar`
+  )
+  in ksh will create a parameter with value mytt(foo bar), but in zsh will
+  create a parameter tt(param) with value tt(foo) and a parameter tt(bar)
+  whose value is empty.  Contrast this with a normal assignment (no
+  tt(typeset) or other command in front), which never causes a word split
+  unless you have tt(GLOB_ASSIGN) set.  From zsh version 4.0.2 the option
+  tt(KSH_TYPESET), set automatically in compatibility mode, fixes this
+  problem.  Note that in bash this behaviour occurs with all arguments that
+  look like assignments, whatever the command name; to get this behaviour
+  in zsh you have to set the option tt(MAGIC_EQUAL_SUBST).
 
 sect(In which startup file do I put...?)
 


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-04-30 19:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-24 19:31 Z-Shell (zsh) FAQ changes this month Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2003-04-30 18:48 Peter Stephenson
2003-01-26 17:42 Peter Stephenson
2002-09-27 21:42 Peter Stephenson
2002-08-25 16:42 Peter Stephenson
2002-06-24 21:05 Peter Stephenson
2002-05-25 16:54 Peter Stephenson
2002-04-24 20:55 Peter Stephenson
2002-02-24 13:53 Peter Stephenson
2002-01-23 22:09 Peter Stephenson
2001-12-21 17:17 Peter Stephenson
2001-11-25 16:43 Peter Stephenson
2001-10-28 19:35 Peter Stephenson
2001-09-24 21:44 Peter Stephenson
2001-08-27 19:08 Peter Stephenson
2001-07-24 22:14 Peter Stephenson
2001-06-25 21:14 Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).