head	2.20;
access;
symbols
	3_0_1:2.20
	3_0_0:2.18
	3_0-pre6:2.16
	3_0-pre5:2.16
	3_0-pre4:2.16
	beta15:2.10
	beta14:2.10
	beta13:2.8
	beta12:2.7
	beta11:2.7
	beta10:2.4
	3_0-pre3:2.15
	3_0-pre2:2.15
	3_0-pre1:2.15
	beta21:2.12
	beta20:2.12
	beta19:2.8
	beta18:2.8
	beta17:2.8
	beta16:2.8;
locks;
comment	@# @;


2.20
date	96.10.24.09.15.18;	author pws;	state Exp;
branches;
next	2.19;

2.19
date	96.09.25.07.32.16;	author pws;	state Exp;
branches;
next	2.18;

2.18
date	96.08.15.16.15.34;	author pws;	state Exp;
branches;
next	2.17;

2.17
date	96.08.14.08.29.17;	author pws;	state Exp;
branches;
next	2.16;

2.16
date	96.07.25.08.08.47;	author pws;	state Exp;
branches;
next	2.15;

2.15
date	96.06.26.07.15.21;	author pws;	state Exp;
branches;
next	2.14;

2.14
date	96.06.25.07.41.33;	author pws;	state Exp;
branches;
next	2.13;

2.13
date	96.06.25.07.40.55;	author pws;	state Exp;
branches;
next	2.12;

2.12
date	96.05.24.07.55.05;	author pws;	state Exp;
branches;
next	2.11;

2.11
date	96.04.25.09.07.15;	author pws;	state Exp;
branches;
next	2.10;

2.10
date	96.03.25.15.22.13;	author pws;	state Exp;
branches;
next	2.9;

2.9
date	96.01.24.12.48.00;	author pypeters;	state Exp;
branches;
next	2.8;

2.8
date	95.11.24.12.53.15;	author pypeters;	state Exp;
branches;
next	2.7;

2.7
date	95.10.24.11.02.24;	author pypeters;	state Exp;
branches;
next	2.6;

2.6
date	95.09.25.15.27.54;	author pypeters;	state Exp;
branches;
next	2.5;

2.5
date	95.07.18.15.26.20;	author pypeters;	state Exp;
branches;
next	2.4;

2.4
date	95.06.23.11.10.23;	author pypeters;	state Exp;
branches;
next	2.3;

2.3
date	95.05.24.09.37.04;	author pypeters;	state Exp;
branches;
next	2.2;

2.2
date	95.04.24.09.21.18;	author pypeters;	state Exp;
branches;
next	1.34;

1.34
date	95.02.24.16.16.09;	author pws;	state Exp;
branches;
next	1.33;

1.33
date	95.01.30.10.52.43;	author pws;	state Exp;
branches;
next	1.32;

1.32
date	94.12.14.12.44.35;	author pws;	state Exp;
branches;
next	1.31;

1.31
date	94.11.24.11.26.10;	author pws;	state Exp;
branches;
next	1.30;

1.30
date	94.10.25.11.26.39;	author pws;	state Exp;
branches;
next	1.29;

1.29
date	94.09.25.13.40.52;	author pws;	state Exp;
branches;
next	1.28;

1.28
date	94.08.17.16.19.08;	author pws;	state Exp;
branches;
next	1.27;

1.27
date	94.07.18.16.28.20;	author pws;	state Exp;
branches;
next	1.26;

1.26
date	94.06.27.13.42.21;	author pws;	state Exp;
branches;
next	1.25;

1.25
date	94.05.25.11.01.40;	author pws;	state Exp;
branches;
next	1.24;

1.24
date	94.04.25.16.50.31;	author pws;	state Exp;
branches;
next	1.23;

1.23
date	94.03.23.18.18.21;	author pws;	state Exp;
branches;
next	1.22;

1.22
date	94.02.28.17.19.21;	author pws;	state Exp;
branches;
next	1.21;

1.21
date	94.01.25.11.10.29;	author pws;	state Exp;
branches;
next	1.20;

1.20
date	93.12.21.15.15.46;	author pws;	state Exp;
branches;
next	1.19;

1.19
date	93.11.26.14.39.33;	author pws;	state Exp;
branches;
next	1.18;

1.18
date	93.11.15.15.20.40;	author pws;	state Exp;
branches;
next	1.17;

1.17
date	93.09.29.11.54.38;	author pws;	state Exp;
branches;
next	1.16;

1.16
date	93.09.16.12.27.26;	author pws;	state Exp;
branches;
next	1.15;

1.15
date	93.08.23.14.27.01;	author pws;	state Exp;
branches;
next	1.14;

1.14
date	93.08.16.09.12.45;	author pws;	state Exp;
branches;
next	1.13;

1.13
date	93.07.23.09.41.10;	author pws;	state Exp;
branches;
next	1.12;

1.12
date	93.07.11.18.07.40;	author pws;	state Exp;
branches;
next	1.11;

1.11
date	93.06.22.13.46.18;	author pws;	state Exp;
branches;
next	1.10;

1.10
date	93.06.09.12.50.26;	author pws;	state Exp;
branches;
next	1.9;

1.9
date	93.05.23.19.03.59;	author pws;	state Exp;
branches;
next	1.8;

1.8
date	93.05.06.12.15.09;	author pws;	state Exp;
branches;
next	1.7;

1.7
date	93.04.23.20.41.55;	author pws;	state Exp;
branches;
next	1.6;

1.6
date	93.04.02.11.51.25;	author pws;	state Exp;
branches;
next	1.5;

1.5
date	93.03.19.13.14.32;	author pws;	state Exp;
branches;
next	1.4;

1.4
date	93.02.22.11.27.16;	author pws;	state Exp;
branches;
next	1.3;

1.3
date	93.02.04.10.17.55;	author pws;	state Exp;
branches;
next	1.2;

1.2
date	93.01.19.10.00.17;	author pws;	state Exp;
branches;
next	1.1;

1.1
date	92.12.14.15.26.33;	author pws;	state Exp;
branches;
next	;


desc
@Frequently-Asked Questions concerning the Z-shell
@


2.20
log
@checked in with -k by hzoli at 1996/10/25 19:57:51
@
text
@Archive-Name: unix-faq/shell/zsh
Last-Modified: 1996/10/24
Submitted-By: pws@@amtp.liv.ac.uk (Peter Stephenson)
Version: $Id: zsh.FAQ,v 2.20 1996/10/24 09:15:18 pws Exp $
Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995, 1996 (see end of document)

Changes since last issue:
- in Z1: removed =(...) bug again
         mention pushd change

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.
In fact, zsh is currently the most powerful freely available shell.

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 A5); if you want to know what to do with insoluble
problems, go to Z2).

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

Contents:
Section A:  Introducing zsh and how to install it
A0) Sources of information
A1) What is it?
A2) What is it good at?
A3) On what machines will it run?  (Plus important compilation notes)
A4) What's the latest version?
A5) Where do I get it?
A6) I don't have root access: how do I make zsh my login shell?

Section B:  How does zsh differ from...?
B1) sh and ksh?
B2) csh?
B3) Why do my csh aliases not work?  (Plus other alias pitfalls.)
B4) tcsh?
B5) bash?
B6) Shouldn't zsh be more/less like ksh/(t)csh?

Section C:  How to get various things to work
C1) How do I turn off spelling correction/globbing for an individual command?
C2) How do I get the meta key to work on my xterm?
C3) Why does my terminal act funny in some way?
C4) Why does `$var' where var="foo bar" not do what I expect?
C5) Why do my autoloaded functions not autoload [the first time]?
C6) How does base arithmetic work?
C7) How do I get a newline in my prompt?
C8) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
C9) Why can't I bind \C-s and \C-q any more?
C10) How do I execute command `foo' within function `foo'?
C11) Why do history substitutions with single bangs do something funny?
C12) Why does zsh kill off all my background jobs when I logout?
C13) How do I list all my history entries?

Section D:  The mysteries of completion
D1) What is completion?
D2) What sorts of things can be completed?
D3) How does zsh deal with ambiguous completions?
D4) How do I get started with programmable completion?
D5) And if programmable completion isn't good enough?

Section Z:  The future of zsh
Z1) What bugs are currently known and unfixed? (Plus recent important changes)
Z2) Where do I report bugs, get more info / who's working on zsh?
Z3) What's on the wish-list?

Acknowledgments

Copyright
--- End of Contents ---


Section A:  Introducing zsh and how to install it

A0) Sources of information

  Information on zsh is now available via the World Wide Web.  The URL
  is "http://www.mal.com/zsh/".  The server provides this FAQ and much
  else (thanks to Mark Borges for this).  The FAQ is at
  "http://www.mal.com/zsh/FAQ/".

  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.  (This article
  also talks about shell startup files which would otherwise rate a
  mention here.)  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.ruu.nl/wais/html/na-dir/unix-faq/shell/.html

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

  (As a method of reading this 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 Z2).


A1) What is it?

  Zsh is a UNIX command interpreter (shell) which of the standard
  shells most resembles the Korn shell (ksh); it's compatibility with
  the 1988 Korn shell has been gradually increasing.  It includes
  enhancements of many types, notably in the command-line editor,
  options for customising its behaviour, filename globbing, features
  to make C-shell (csh) users feel more at home and extra features
  drawn from tcsh (another `custom' shell).

  It was written by Paul Falstad when a student at Princeton; however,
  Paul doesn't maintain it any more and enquiries should be sent to
  the mailing list (see question Z2).  Zsh is distributed under a
  standard Berkeley style copyright.

  For more information, the files Doc/intro.txt or Doc/intro.troff
  included with the source distribution are highly recommended.  A list
  of features is given in FEATURES, also with the source.


A2) What is it good at?

  Here are some things that zsh is particularly good at.  No claim of
  exclusivity is made, especially as shells copy one another, though
  in the areas of command line editing and globbing zsh is well ahead
  of the competition.  I am not aware of a major feature in any other
  freely-available shell which zsh does not also have (except smallness).

  Command line editing:
    programmable completion: incorporates the ability to use
      the full power of zsh globbing (compctl -g),
    multi-line commands editable as a single buffer (even files!),
    variable editing (vared),
    command buffer stack,
    print text straight into the buffer for immediate editing (print -z),
    execution of unbound commands,
    menu completion,
    variable, editing function and option name completion,
    inline expansion of variables, history commands.
  Globbing --- extremely powerful, including:
    recursive globbing (cf. find),
    file attribute qualifiers (size, type, etc. also cf. find),
    full alternation and negation of patterns.
  Handling of multiple redirections (simpler than tee).
  Large number of options for tailoring.
  Path expansion (=foo -> /usr/bin/foo).
  Adaptable messages for spelling, watch, time as well as prompt
    (including conditional expressions).
  Named directories.
  Comprehensive integer arithmetic.
  Manipulation of arrays (including reverse subscripting).
  Spelling correction.


A3) On what machines will it run?

  From version 3.0, zsh uses GNU autoconf as the installation
  mechanism.  This considerably increases flexibility over the old
  `buildzsh' mechanism.  Consequently, zsh should compile and run on
  any modern version of UNIX, and a great many not-so-modern versions
  too.  The file Etc/MACHINES in the distribution has more details.

  If you need to change something to support a new machine, it would be
  appreciated if you could add any necessary preprocessor code and
  alter configure.in and config.h.in to configure zsh automatically,
  then send the required context diffs to the list (see question Z2).
  Changes based on version 2.5 are very unlikely to be useful.

  To get it to work, retrieve the source distribution (see question
  A5), un-gzip it, un-tar it and read the INSTALL file in the top
  directory.  Also read the Etc/MACHINES file for up-to-date
  information on compilation on certain architectures.

  *Note for users of nawk* (The following information comes from
  Zoltan Hidvegi):  On some systems nawk is broken and produces an
  incorrect signames.h file. This make the signals code unusable. This
  often happens on Ultrix, HP-UX, IRIX (?). Install gawk if you
  experience such problems.


A4) What's the latest version?

  Zsh 3.0.0 has now been relased; 3.0.1 is under test.  The new major
  number 3.0 largely reflects the 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
  Z1).  This is longer than usual due to enhanced sh, ksh and POSIX
  compatibility.

  Development of zsh is usually 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.

  Note also that as the shell changes, it may become incompatible with
  older versions; see the end of question Z1 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 (most recently) to provide POSIX compliancy.


A5) Where do I get it?

  The archive is now run by Zoltan Hidvegi <hzoli@@cs.elte.hu>.
  The following are known mirrors (kept frequently up to date); the
  first is the official archive site.  All are available by anonymous
  FTP.

    Hungary     ftp://ftp.cs.elte.hu/pub/zsh/
    Australia   ftp://ftp.ips.gov.au/mirror/zsh/
    France      ftp://ftp.cenatls.cena.dgac.fr/pub/shells/zsh/
    Germany     ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/
                ftp://ftp.uni-trier.de/pub/unix/shell/zsh/
                ftp://ftp.prz.tu-berlin.de/pub/unix/shells/zsh
    Japan       ftp://ftp.tohoku.ac.jp/mirror/zsh/
                ftp://ftp.iij.ad.jp/pub/misc/zsh/
    Norway      ftp://ftp.uit.no/pub/unix/shells/zsh/
    Sweden      ftp://ftp.lysator.liu.se/pub/unix/zsh/
    UK          ftp://ftp.net.lut.ac.uk/zsh/
                (also by FSP at port 21)
    USA         ftp://ftp.math.gatech.edu/pub/zsh/
                ftp://uiarchive.cso.uiuc.edu/pub/packages/shells/zsh/
                ftp://ftp.sterling.com/zsh/
                ftp://ftp.rge.com/pub/shells/zsh/

  (If you don't understand URL's, the first thing after the ftp:// is
  the hostname and the remainder after the / is the directory.  You
  can supply these directly to a Web browser.  If you're reading this
  with a recent version of Netscape Navigator, you may just have to
  click on them.)

  The latest full release is in zsh.tar.gz in these directories.  Note
  that this is in gzip format: you will need GNU gzip from your
  nearest GNU archive to unpack it.  The up-to-the-minute development
  version is in zsh-beta.tar.gz.  There is also a version under RCS
  control which may be more suitable for source hackers.


A6) 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.

  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.


Section B:  How does zsh differ from...?

As has already been mentioned, zsh is most similar to ksh, while many
of the additions are to please csh users.  Here are some more detailed
notes.

B1) Differences from sh and ksh

  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 with ksh93 will be more
  substantial.

  As a summary of the status:
    i) 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;
   ii) 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);
  iii) 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;
   iv) 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 --- see the detailed
       list below;
    v) 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 commands
       `emulate sh; setopt localoptions' in a shell function will
       turn on sh emulation for that function only.

  The classic difference is word splitting, discussed in C4); 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_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 C4) 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 and 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. 

  Syntax:
  * Shell word splitting: see question C4).
  * 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.
      The KSH_ARRAYS option is now available.
    Coprocesses are established by `coproc'; `|&' behaves like csh.
  Command line substitutions, globbing etc.:
  * Failure to match a globbing pattern causes an error (use
      NO_NOMATCH).
  * The results of parameter substitutions are treated as plain text:
      `foo="*"; print $foo' prints all files in ksh but * in zsh.
      (GLOB_SUBST has been added to fix this.)
    The backslash in $(echo '\$x') is treated differently:  in ksh, it
      is not stripped, in zsh it is.  (The `...` form gives the same in
      both shells.)
  * $PSn do not do parameter substitution by default (use PROMPT_SUBST).
    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.
      [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 `**'.
    Unquoted assignments do file expansion after `:'s (intended for PATHs).
    `integer' does not allow -i.
  Command execution:
  * There is no $ENV variable (use /etc/zshrc, ~/.zshrc; note also $ZDOTDIR).
    $PATH is not searched for commands specified at invocation without -c.
  Aliases and functions:
    The order in which aliases and functions are defined is significant
      (function definitions with () expand aliases -- see question B3).
    Aliases and functions cannot be exported.
    There are no tracked aliases: command hashing replaces these.
    The use of aliases for key bindings is replaced by `bindkey'.
  * 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).
  Traps and signals:
    Traps are not local to functions.
    TRAPERR has become TRAPZERR (this was forced by UNICOS which has SIGERR).
  Editing:
    The options emacs, gmacs, trackall, viraw are not supported.
      Use bindkey to change the editing behaviour: `set -o {emacs,vi}'
      become `bindkey -{e,v}'; for gmacs, go to emacs mode and use
      `bindkey \^t gosmacs-transpose-characters'.  `Trackall' is replaced
      by `hashcmds'.
    The `keyword' option does not exist and -k is instead interactivecomments.
      (`keyword' will not be in the next ksh release either.)
    Management of histories in multiple shells is different:
      the history list is not saved and restored after each command.
    \ does not escape editing chars (use ^V).
    Not all ksh bindings are set (e.g. `<ESC>#'; try <ESC>q).
  * # in an interactive shell is not treated as a comment by default.
  Built-in commands:
    Some built-ins (r, autoload, history, integer ...) were aliases in ksh.
    There is no built-in command newgrp: use e.g. `alias newgrp="exec newgrp"'
    `jobs' has no `-n' flag.
    `read' has no `-s' flag.
    In `let "i = foo"', foo is evaluated as a number, not an expression
      (although in `let "i = $foo"' it is treated as an expression).
  Other idiosyncrasies:
    `select' always redisplays the list of selections on each loop.


B2) Similarities with csh

  Although certain features aim to ease the withdrawal symptoms of csh
  (ab)users, the syntax is in general rather different and you should
  certainly not try to run scripts without modification.  The c2z script
  is provided with the source (in scripts/c2z) to help convert .cshrc
  and .login files; see also the next question concerning aliases,
  particularly those with arguments.

  Csh-compatibility additions include:
    Logout, rehash, source, (un)limit built-in commands.
    *rc file for interactive shells.
    Directory stacks.
    Cshjunkie*, ignoreeof options.
    The CSH_NULL_GLOB option.
    >&, |& etc. redirection.
      (Note that `>file 2>&1' is the standard Bourne shell command for
      csh's `>&file'.)
    foreach ... loops; alternative syntax for other loops.
    Alternative syntax `if ( ... ) ...', though this still doesn't
      work like csh: it expects a command in the parentheses.  Also
      `for', `which').
    $PROMPT as well as $PS1, $status as well as $?, $#argv as well as $#, ....
    Escape sequences via % for prompts.
    Special array variables $PATH etc. are colon-separated, $path are arrays.
    !-type history (which may be turned off via `setopt nobanghist').
    Arrays have csh-like features (see under B1)).


B3) 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:
        a.  convert all of them to zsh functions; or
        b.  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 shwordsplit and ksharrays 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               "$@@"            ($*:q doesn't work (yet))
            \!*: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.  Luckily,
  it is not possible to define `function' as an alias.


B4) Similarities with tcsh:

  (The sections on csh apply too, of course.)  Certain features have
  been borrowed from tcsh, including $watch, run-help, $savehist,
  $histlit, periodic commands etc., extended prompts, sched and which
  built-ins.  Programmable completion was inspired by, but is entirely
  different to, tcsh's `complete'.  (There is a perl script called
  lete2ctl in the Misc directory of the source distribution to convert
  `complete' to `compctl' statements.)  This list is not definitive:
  some features have gone in the other direction.

  If you're missing the editor function run-fg-editor, try something
  with bindkey -s (which binds a string to a keystroke), e.g.
        bindkey -s '^z' '\eqfg %$EDITOR:t\n'
  which pushes the current line onto the stack and tries to bring a job
  with the basename of your editor into the foreground.  Bindkey -s
  allows limitless possibilities along these lines.


B5) Similarities with bash

  Zsh has almost all the features that bash has (and much more); in
  addition it is about twice as fast, though this is less impressive
  than it sounds.  With the new malloc by Sven Wischnowsky (only used
  if you used `configure --enable-zsh-mem' when configuring), zsh uses
  about the same amount of heap memory as bash, which was previously
  the biggest gripe.  The only feature I am aware of that zsh doesn't
  have is setting a numerical value for ignoreeof --- it's always 10
  --- but of course I don't use bash :-).

  On the other hand, zsh is not strictly POSIX compliant --- though
  the latest beta version is and production version 3 will be very
  much more so than the last production version, with the appropriate
  options set or when invoked as sh or ksh --- and will not use GNU
  readline (zle is more powerful).  In fact, bash is intended more as
  an enhanced sh than a ksh work-alike; it doesn't handle [[ ... ]],
  or (yet) arrays, for example.  Of course, they're working on bash,
  too.  Some zsh-like features are suggested for future versions.


B6) Shouldn't zsh be more/less like ksh/(t)csh?

  People often ask why zsh has all these `unnecessary' csh-like features,
  or alternatively why zsh doesn't understand more csh syntax.  This is
  far from a definitive answer and the debate will no doubt continue.

  Paul's object in writing zsh was to produce a ksh-like shell which
  would have features familiar to csh users.  For a long time, csh was
  the preferred interactive shell and there is a strong resistance to
  changing to something unfamiliar, hence the additional syntax and
  CSH_JUNKIE options.  This argument still holds.  On the other hand,
  the arguments for having what is close to a plug-in replacement for ksh
  are, if anything, even more powerful:  the deficiencies of csh as a
  programming language are well known (look in any Usenet FAQ archive, e.g.
    http://www.cis.ohio-state.edu/hypertext/faq/usenet/unix-faq/shell/\
    csh-whynot/faq.html
  if you are in any doubt) and zsh is able to run many standard
  scripts such as /etc/rc.

  Of course, this makes zsh rather large and feature-ridden so that it
  seems to appeal mainly to hackers --- but note it is only slightly
  larger than bash and tcsh, and uses much less memory and CPU time
  than tcsh.  The only answer, perhaps not entirely satisfactory, is
  that you have to ignore the bits you don't want.


Section C:  How to get various things to work

C1) How do I turn off spelling correction/globbing for an individual command?

  In the first case, you presumably have `setopt correctall' in an
  initialisation file, so that zsh checks the spelling of each word in
  the command line.  You probably do not want this behaviour for
  commands which do not operate on existing files.

  The answer is to alias the offending command to itself with
  `nocorrect' stuck on the front, e.g.
       alias mkdir='nocorrect mkdir'

  To turn off globbing, the rationale is identical:
       alias mkdir='noglob mkdir'
  (you can have both nocorrect and nglob, if you like).


C2) How do I get the meta key to work on my xterm?

  As stated in the manual, zsh needs to be told about the meta key by
  using `bindkey -me' or `bindkey -mv' in your .zshrc or on the command
  line.  You probably also need to tell the terminal driver to allow the
  `meta' bit of the character through; `stty pass8' is the usual
  incantation.  Sample .zshrc entry:
        [[ $TERM = "xterm" ]] && stty pass8 && bindkey -me
  or, on SYSVR4-ish systems without pass8,
        [[ $TERM = "xterm" ]] && stty -parenb -istrip cs8 && bindkey -me
  (disable parity detection, don't strip high bit, use 8-bit characters).
  Make sure this comes *before* any bindkey entries in your .zshrc which
  redefine keys normally defined in the emacs/vi keymap.


C3) Why does my terminal act funny in some way?

  If you are using an OpenWindows cmdtool as your terminal, any
  escape sequences (such as those produced by cursor keys) will be
  swallowed up and never reach zsh.  Either use shelltool or avoid
  commands with escape sequences.  You can also disable scrolling from
  the cmdtool pane menu (which effectively turns it into a shelltool).
  If you still want scrolling, try using an xterm with the scrollbar
  activated.

  If that's not the problem, and you are using stty to change some tty
  settings, make sure you haven't asked zsh to freeze the tty settings:
  type
        ttyctl -u
  before any stty commands you use.

  On the other hand, if you aren't using stty and have problems you may
  need the opposite:  `ttyctl -f' freezes the terminal to protect it
  from hiccups introduced by other programmes (kermit has been known to
  do this).

  If _that's_ not the problem, and you are having difficulties with
  external commands (not part of zsh), and you think some terminal
  setting is wrong (e.g. ^V is getting interpreted as `literal next
  character' when you don't want it to be), try
        ttyctl -u
        STTY='lnext "^-"' commandname
  (in this example), or just export STTY for all commands to see.  Note
  that zsh doesn't reset the terminal completely afterwards: just the
  modes it uses itself and a number of special processing characters
  (see the stty(1) manual page).

  At some point there may be an overhaul which allows the terminal
  modes used by the shell to be modified separately from those seen by
  external programmes.  This is partially implemented already: from 2.5,
  the shell is less susceptible to mode changes inherited from
  programmes than it used to be.


C4) 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.)  An option
  (shwordsplit) 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 shwordsplit.
  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 shwordsplit for one variable only:
        args ${=sentence}
  always returns 8 with the above definition of `args'.  (In older
  versions of zsh, ${=foo} toggled shwordsplit; 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).

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


C5) Why do my autoloaded functions not autoload [the first time]?

  (Before version 3.0, autoloading in the Korn shell way was not
  allowed; this article is now a historical artefact and will
  eventually be removed.  Note, however, that the old form of
  autoloading is still allowed and there are no plans to remove it.)

  When you put a shell function in an autoload directory (i.e. one
  mentioned in $FPATH), it should be written just as if it were a
  shell script.  In other words, there should be no line at the
  beginning saying `function foo {' or `foo () {', and consequently no
  matching '}' at the end.  If you include those, then the first time
  you try to use the function, the _whole_ file is run --- in other
  words, zsh simply defines the function and does nothing else.

  As a concrete example, if you have a function which you would define
  on the command line as `xhead () { print -n "\033]2;$*\a"; }' and
  your have assigned `FPATH=~/fns', then your .zshrc should contain
  `autoload xhead' and the file ~/fns/xhead should contain only
  `print -n "\033]2;$*\a"'.  (A neat trick to autoload all functions
  in a given directory is to include a line like `autoload ~/fns/*(:t)'
  in .zshrc; the bit in parentheses removes the directory part of the
  filenames, leaving just the function names.)


C6) How does base arithmetic work?

  The ksh syntax is now understood, i.e.
        let 'foo = 16#ff'
  or equivalently
        (( foo = 16#ff ))
  or even
        foo=$[16#ff]
  (note that `foo=$((16#ff))' is now supported).  The original syntax was
        (( foo = [16]ff ))
  --- this was based on a misunderstanding of the ksh manual page.  It
  still works but its use is deprecated.
  Then
        echo $foo
  gives the answer `255'.  It is possible to declare variables explicitly
  to be integers, via
        typeset -i foo
  which has a different effect: namely the base used in the first
  assignment (hexadecimal in the example) is subsequently used whenever
  `foo' is displayed (although the internal representation is unchanged).
  To ensure foo is always displayed in decimal, declare it as
        typeset -i 10 foo
  which requests base 10 for output.  You can change the output base of an
  existing variable in this fashion.  Using the `$[ ... ]' method will
  always display in decimal.


C7) How do I get a newline in my prompt?

  You can place a literal newline in quotes, i.e.
        PROMPT="Hi Joe,
        what now?%# "
  If you have the bad taste to set the option cshjunkiequotes, which
  inhibits such behaviour, you will have to bracket this with
  `unsetopt cshjunkiequotes' and `setopt cshjunkiequotes', or put it in
  your .zshrc before the option is set.

  Arguably the prompt code should handle `print'-like escapes.  Feel
  free to write this :-).  Otherwise, you can use
        PROMPT=$(print "Hi Joe,\nwhat now?%# ")
  in your initialisation file.


C8) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?

  You probably have the extendedglob option set in which case ^ and #
  are metacharacters.  ^a matches any file except one called a, so the
  line is interpreted as bindkey followed by a list of files.  Quote the
  ^ with a backslash or put quotation marks around ^a.


C9) Why can't I bind \C-s and \C-q any more?

  The control-s and control-q keys now do flow control by default,
  unless you have turned this off with `stty -ixon' or redefined the
  keys which control it with `stty start' or `stty stop'.  (This is
  done by the system, not zsh; the shell simply respects these
  settings.)  In other words, \C-s stops all output to the terminal,
  while \C-q resumes it.

  There is an option NO_FLOW_CONTROL to stop zsh from allowing flow
  control and hence restoring the use of the keys: put `setopt
  noflowcontrol' in .zshrc.


C10) How do I execute command `foo' within function `foo'?

  The command `command foo' does just that.  You don't need this with
  aliases, but you do with functions.  Note that error messages like
        zsh: job table full or recursion limit exceeded
  are a good sign that you tried calling `foo' in function `foo' without
  using `command'.


C11) Why do history substitutions with single bangs do something funny?

  If you have a command like "echo !-2:$ !$", the first history
  substitution then sets a default to which later history substitutions
  with single unqualified bangs refer, so that !$ becomes equivalent to
  !-2:$.  The option CSH_JUNKIE_HISTORY makes all single bangs refer
  to the last command.


C12) 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 `nohup'
  option exists if you don't want them killed.  Note that you can always
  run programs with `nohup' in front of the pipeline whether or not the
  option is set, which will prevent that job from being killed on
  logout.  (Nohup is actually an external command.)

  The `disown' builtin is very useful in this respect: if zsh informs
  you that you have background jobs when you try to logout, you can
  `disown' all the ones you don't want killed when you exit.  This is
  also a good way of making jobs you don't need the shell to know about
  (such as commands which create new windows) invisible to the shell.


C13) How do I list all my history entries?

Tell zsh to start from entry 1: `history 1'.  Those entries at the
start which are no longer in memory will be silently omitted.


Section D:  The mysteries of completion

Programmable completion using the `compctl' command is one of the most
powerful, and also potentially confusing, features of zsh; here I give
a short introduction.  There is a set of example completions supplied
with the source in Misc/compctl-examples; completion definitions for
many of the most obvious commands can be found there.

D1) What is completion?

  `Completion' is where you hit a particular command key (TAB is the
  standard one) and the shell tries to guess the word you are typing
  and finish it for you --- a godsend for long file names, in
  particular, but in zsh there are many, many more possibilities than
  that.

  There is also a related process, `expansion', where the shell sees
  you have typed something which would be turned by the shell into
  something else, such as a variable turning into its value ($PWD
  becomes /home/users/mydir) or a history reference (!! becomes
  everything on the last command line).  In zsh, when you hit TAB it
  will look to see if there is an expansion to be done; if there is,
  it does that, otherwise it tries to perform completion.  (You can
  see if the word would be expanded --- not completed --- by TAB by
  typing "CTRL-x g", which lists expansions.)  Expansion is generally
  fairly intuitive and not under user control; for the rest of the
  section I will discuss completion only.


D2) What sorts of things can be completed?

  The simplest sort is filename completion, mentioned above.  Unless
  you have made special arrangements, as described below, then after
  you type a command name, anything else you type is assumed by the
  completion system to be a filename.  If you type part of a word and
  hit TAB, zsh will see if it matches the first part a file name and
  if it does it will automatically insert the rest.

  The other simple type is command completion, which applies
  (naturally) to the first word on the line.  In this case, zsh
  assumes the word is some command to be executed lying in your $PATH
  and tries to complete that.

  Other forms of completion have to be set up by special arrangement.
  See the manual entry for compctl for a list of all the flags:  you
  can make commands complete variable names, user names, job names,
  etc., etc.

  For example, one common use is that you have an array variable,
  $hosts, which contains names of other machines you use frequently on
  the network:
        hosts=(fred.ph.ku.ac.uk snuggles.floppy-bunnies.com here.there.edu)
  then you can tell zsh that when you use telnet (or ftp, or ...), the
  argument will be one of those names:
        compctl -k hosts telnet ftp ...
  so that if you type `telnet fr' and hit TAB, the rest of the name
  will appear by itself.

  An even more powerful option to compctl (-g) is to tell zsh that
  only certain sorts of filename are allowed.  The argument to -g is
  exactly like a glob pattern, with the usual wildcards `*', `?', etc.
  In the compctl statement it needs to be quoted to avoid it being
  turned into filenames straight away.  For example,
        compctl -g '*.(ps|eps)' ghostview
  tells zsh that if you type TAB on an argument after a ghostview
  command, only files ending in `.ps' or `.eps' should be considered
  for completion.

  Note that flags may be combined; if you have more than one, all the
  possible completions for all of them are put into the same list, all
  of them being possible completions.  So
        compctl -k hosts -f rcp
  tells zsh that rcp can have a hostname or a filename after it.  (You
  really need to be able to handle host:file, which is where
  programmable completion comes in, see D4).)


D3) How does zsh deal with ambiguous completions?

  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 it's options.  The default is
  for it to beep and completion to stop until you type another
  character.  You can type ^D to see all the possible completions.
  This can be changed by the following options, among others:
    - with nobeep set, that annoying beep goes away
    - with nolistbeep, beeping is only turned off for ambiguous completions
    - with autolist set, when the completion is ambiguous you get a
      list without having to type ^D
    - with listambigous, this is modified so that nothing is listed if
      there is an unambiguous prefix or suffix to be inserted
    - with menucomplete set, one completion is always inserted
      completely, then when you hit TAB it changes to the next, and so
      on until you get back to where you started
    - with automenu, you only get the menu behaviour when you hit TAB
      again on the ambiguous completion.  
  Combinations of these are possible; for example, autolist and
  automenu together give an intuitive combination. 


D4) How do I get started with programmable completion?

  Finally, the hairiest part of completion.  It is possible to get zsh
  to consider different completions not only for different commands,
  but for different words of the same command, or even to look at
  other words on the command line (for example, if the last word was a
  particular flag) and decide then.

  There are really two sorts of things to worry about.  The simpler is
  alternative completion:  that just means zsh will try one
  alternative, and only if there are no possible completions try the
  next.  For example
        compctl -g '*.ps' + -f lpr
  says that after lpr you'd prefer to find only `.ps' files, so if
  there are any, only those are used, but if there aren't any, any
  old file is a possibility.  You can also have a + with no flags
  after it, which tells zsh that it's to treat the command like any
  other if nothing was found.  That's only really useful if your
  default completion is fancy, i.e. you have done something with
  `compctl -D' to tell zsh how commands which aren't specially handled
  are to have their arguments completed.

  The second sort is the hard one.  Following a `-x', zsh expects that
  the next thing will be some completion code, which is a single
  letter followed by an argument in square brackets.  For example
  'p[1]': `p' is for position, and the argument tells it to look at
  position 1; that says that this completion only applies to the word
  immediately after the command.  You can also say 'p[1,3]' which says
  the completion only applies to the word if it's between the first
  and third words, inclusive, after the command, and so on.  See the
  list in the `compctl' manual entry for a list of these conditions:
  some conditions take one argument in the square brackets, some two.
  Usually, negative numeric arguments count backwards from the end
  (for example, 'p[-1]' applies to the last word on the line).

  The condition is then followed by the flags as usual (as in D2)),
  and possibly other condition/flag sets following a single -; the
  whole lot ends with a double -- before the command name.  In other
  words, each extended completion section looks like this:
        -x <pattern> <flags>... [ - <pattern> <flags>... ...] --

  Let's look at rcp again: this assumes you've set up $hosts as above.
  This uses the `n[<n>,<string>]' flag, which tells zsh to look for
  the <n>'th occurrence of <string> in the word, ignoring anything up
  to and including that.  We'll use it for completing the bits of
  rcp's `user@@host:file' combination.  (Of course, the file name is on
  the local machine, not `host', but let's ignore that; it may still
  be useful.)
        compctl -k hosts -S ':' + -f -x 'n[1,:]' -f - \
          'n[1,@@]' -k hosts -S ':' -- rcp
  This means: (1) try and complete a hostname (the bit before the
  `+'), if successful add a `:' (-S for suffix); (2) if that fails
  move on to try the code after the `+':  look and see if there is a
  `:' in a word (the `n[1,:]'); if there is, complete filenames (-f)
  after the first of them; (3) otherwise look for an `@@' and complete
  hostnames after the first of them (the `n[1,@@]'), adding a `:' if
  successful; (4) if all else fails use the -f before the `-x' and try
  to complete files.

  So the rules for order are (1) try anything before a `+' before
  anything after it (2) try the conditions after a -x in order until
  one succeeds (3) use the default flags before the -x if none of the
  conditions was true.

  Different conditions can also be combined.  There are three levels
  of this (in decreasing order of precedence):
    i) multiple square brackets after a single condition give
      alternatives:  for example, 's[foo][bar]' says apply the
      completion if the word begins with `foo' or `bar',
   ii) spaces between conditions mean both must match:  for example,
      'p[1] s[-]' says this completion only applies for the first word
      after the command and only if it begins with a `-',
  iii) commas between conditions mean either can match:  for example,
      'c[-1,-f], s[-f]' means either the previous word (-1 relative to
      the current one) is -f, or the current word begins with -f ---
      useful to use the same completion whether or not the -f has a
      space after it.

  Here's a useless example just to show a general `-x' completion.
        compctl -f -x 'c[-1,-u][-1,-U] p[2], s[-u]' -u - \
          'c[-1,-j]' -P % -j -- foobar
  The way to read this is:  for command `foobar', look and see if (((the
  word before the current one is -u) or (the word before the current
  one is -U)) and (the current word is 2)) or (the current word begins
  with -u); if so, try to complete user names.  If the word before
  the current one is -j, insert the prefix `%' before the current word
  if it's not there already and complete job names.  Otherwise, just
  complete file names.


D5) And if programmable completion isn't good enough?

  ...then your last resort is to write a shell function to do it for
  you.  By combining the `-U' and `-K func' flags you can get almost
  unlimited power.  The `-U' tells zsh that whatever the completion
  produces is to be used, even if it doesn't fit what's there already
  (so that gets deleted when the completion is inserted).  The `-K
  func' tells zsh a function name.  The function is passed what's on
  the line already, but it can return anything it likes via the
  `reply' array, and this becomes the set of possible completions.
  The best way to understand this is to look at `multicomp' and other
  functions supplied with the zsh distribution.


Section Z:  The future of zsh

Z1) What bugs are currently known and unfixed? (Plus recent important changes)

  Here are some of the more well-known ones, very roughly in
  decreasing order of significance.  Many of these can also be counted
  against differences from ksh in question B1); note that this applies
  to the latest beta version and that simple bugs are often fixed
  quite quickly.  There is a file Etc/BUGS in the source distribution
  with more detail.

  Special variables won't be unset after e.g. `PATH=... read ...',
    i.e. if used with a builtin command or shell function.
    (According to POSIX, this is not a bug with `special' builtins.)
  `time' is ignored with builtins and can't be used with {...}.
  `set -x' (`setopt xtrace') still has a few glitches.
  The :q modifier doesn't split words and -q and -x don't work for variables.
  In vi mode, `u' can go past the original modification point.
  The singlelinezle option has problems with prompts containing escapes.
  The `r' command does not work inside $(...) or `...` expansions.

  Note that a few recent changes introduce incompatibilities (these
  are not bugs):

  Changes since zsh 2.5:
  Signal traps established with the `trap' builtin are now called with
    the environment of the caller, instead of as a new function level,
    as in ksh.  Traps established as functions (e.g. `TRAPINT()
    {...}') work as before.
  The NO_CLOBBER option is now -C and PRINT_EXIT_VALUE -1; they used
    to be the other way around.  (Use of names rather than letters is
    generally recommended.)
  `[[' is a reserved word, hence must be separated from
    other characters by whitespace; `{' and `}' are also reserved
    words if the IGNORE_BRACES option is set.
  The option CSH_JUNKIE_PAREN has been removed:  csh-like code now
    always does what it looks like it does, so `if ( ... ) ...'
    executes the code in parentheses in a subshell.  To make this
    useful, the syntax expected after an `if', etc., is less strict
    than in other shells.
  On the other hand, `foo=*' does not perform globbing immediately on
    the right hand side of the assignment; the old behaviour now
    requires the option GLOB_ASSIGN.  (`foo=(*)' is and has always
    been the consistent way of doing this.)
  <> performs redirection of input and output to the specified file.
    For numeric globs, you now need <->.
  The command line qualifiers exec, noglob, command, - are now treated
    more like builtin commands:  previously they were syntactically
    special.  This should make it easier to perform tricks with them
    (disabling, hiding in parameters, etc.).
  The pushd builtin has been rewritten for compatibility with other
    shells.  The old behavour can be achieved with a shell function.
  The current version now uses ~'s for directory stack substitution
    instead of ='s.  This is for consistency:  all other directory
    substitution (~user, ~name, ~+, ...) used a tilde, while =<number>
    caused problems with =program substitution.
  The `HISTLIT' option was broken in various ways and has been removed:
    the rewritten history mechanism doesn't alter history lines, making
    the option unnecessary.
  History expansion is disabled in single-quoted strings, like other
    forms of expansion -- hence exclamation marks there should not be
    backslashed.
  The `HISTCHARS' variable is now `histchars'.  Currently both are
    tied together for compatibility.
  The PROMPT_SUBST option now performs backquote expansion -- hence
    you should quote these in prompts.  (SPROMPT has changed as a result.)
  Quoting in prompts has changed: close parentheses inside ternary
    expressions should be quoted with a %; history is now %!, not !.
    Backslashes are no longer special.


Z2) Where do I report bugs, get more info / who's working on zsh?

  The shell is being maintained by various (entirely self-appointed)
  subscribers to the mailing list,
        zsh-workers@@math.gatech.edu
  so any suggestions, complaints, questions and matters for discussion
  should be sent there.  If you want someone to mail you directly, say
  so.  Most patches to zsh appear there first.

  Two progressively lower volume lists exist, one with messages
  concerning the use of zsh,
        zsh-users@@math.gatech.edu
  and one just containing announcements:  about releases, about major
  changes in the shell, or this FAQ, for example,
        zsh-announce@@math.gatech.edu
  (posting to the last one is currently restricted).

  Note that you should only join one of these lists:  people on
  zsh-workers receive all the lists, and people on zsh-users will
  also receive the announcements list.

  The lists are handled by an automated server.  The instructions for
  zsh-announce and zsh-users are the same as for zsh-workers: just
  change zsh-workers to whatever in the following.

  To join zsh-workers, send email to
        zsh-workers-request@@math.gatech.edu
  with the *subject* line (this is a change from the old list)
        subscribe <your-email-address>
  e.g.
        Subject:  subscribe P.Stephenson@@swansea.ac.uk
  and you can unsubscribe in the same way.

  The list maintainer, Richard Coleman, can be reached at
        coleman@@math.gatech.edu

  The list from May 1992 to May 1995 is archived in
        ftp://ftp.sterling.com/zsh/zsh-list/YY-MM
  where YY-MM are the year and month in digits.

  Of course, you can also post zsh queries to the Usenet group
  comp.unix.shell; if all else fails, you could even e-mail me.


Z3) What's on the wish-list?

  Mostly, a lot of the code needs a major clean-up: particular
  offenders are the history code (hist.c: this is under way),
  parameter code (params.c) and substitution code (subst.c).  A more
  efficient set of code for lexing/parsing/execution might also be an
  advantage.  Volunteers are particularly welcome for these tasks.

  Ksh/sh compatibility could be improved; this is a useful long term goal.
  Option for glob qualifiers to follow perl syntax.
  Binding of shell functions (or commands?) to key strokes --
    requires some way of accessing the editing buffer from functions
    and probably of executing zle functions as a command.
  trap '...' FOO should be eval'd rather than called as a function.
  `PATH=' should clear the PATH:  it inserts `.'; use `unset PATH' or
    `path=()' for the time being.  This is not really a bug as the .
    would be used internally in any case (cf. ksh).
  Users should be able to create their own foopath/FOOPATH array/path
    combinations.


Acknowledgments:

Thanks to zsh-list, in particular Bart Schaefer, for suggestions
regarding this document.  Zsh has been in the hands of archivists Jim
Mattson, Bas de Bakker, Richard Coleman and Zoltan Hidvegi, and the
mailing list has been run by Peter Gray, Rick Ohnemus and Richard
Coleman, all of whom deserve thanks.  The world is eternally in the
debt of Paul Falstad for inventing zsh in the first place (though the
wizzo extended completion is by Sven Wischnowsky).


Copyright Information:

This document is copyright (C) P.W. Stephenson, 1995, 1996. 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
license or royalty fees, to use, copy, modify, and distribute this
documentation for any purpose, provided that the above copyright
notice appears in all copies of this documentation.  Remember,
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://www.mal.com/zsh/".
@


2.19
log
@checked in with -k by hzoli at 1996/09/28 14:40:28
@
text
@d2 1
a2 1
Last-Modified: 1996/09/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.19 1996/09/25 07:32:16 pws Exp $
d9 2
a10 4
- in A4: 3.0.0 actually released, 3.0.1 under test
- in C4: fixed `eval' splitting example, whoops
-    D3: added to and rewritten
- in Z1: added =(...) bug
d223 1
a223 1
    Australia   ftp://ftp.ips.oz.au/pub/packages/zsh/
a1119 2
  The file produced by =(...) substitution is removed too early if
     the substitution appears as an argument to a shell function.
d1150 2
@


2.18
log
@checked in with -k by hzoli at 1996/08/15 17:24:50
@
text
@d2 1
a2 1
Last-Modified: 1996/08/15
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.18 1996/08/15 16:15:34 pws Exp $
d9 4
a12 9
- in A4: 3.0 released!
         remove remark about even-numbered minor versions
- in B1: clearer summary of sh/ksh compatibility
         removed <> incompatibility note (now see under Z1)
         ditto GLOB_ASSIGN
- in C5: note this problem is now historical
- in Z1: PRINT_EXIT_VALUE and NO_CLOBBER swapped
         changes in calling of traps
         changes now reflect 3.0; changes up to 2.5 deleted
d34 1
a34 1
A2) What is good at?
d196 7
a202 6
  Zsh 3.0 has now been relased.  The new major number 3.0 largely
  reflects the 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 Z1).  This is longer
  than usual due to enhanced sh, ksh and POSIX compatibility.
d750 5
a754 4
        eval "words=(\"$sentence\")"
  after which $words is an array with the words of $sentence, or, less
  standard but more reliable, turning on shwordsplit for one variable
  only:
d764 2
a765 1
  or when `emulate ksh' or `emulate sh' is in effect.
d982 14
a995 9
  This can be changed by the following options, among others (1) with
  nobeep set, that annoying beep goes away (2) with autolist set, when
  the completion is ambiguous you get a list without having to type
  ^D, (3) with menucomplete set, one completion is always inserted
  completely, then when you hit TAB it changes to the next, and so on
  until you get back to where you started (4) with automenu, you only
  get the menu behaviour when you hit TAB again on the ambiguous
  completion.  Combinations of these are possible; for example,
  autolist and automenu together give an intuitive combination.
d1122 2
@


2.17
log
@checked in with -k by hzoli at 1996/08/14 16:55:56
@
text
@d2 1
a2 1
Last-Modified: 1996/07/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.17 1996/08/14 08:29:17 pws Exp $
d1149 4
a1152 4
  The current beta version now uses ~'s for directory stack
    substitution instead of ='s.  This is for consistency:  all other
    directory substitution (~user, ~name, ~+, ...) used a tilde, while
    =<number> caused problems with =program substitution.
d1204 1
a1204 1
  The list (everything since May 1992) is archived in
d1206 1
a1206 4
  where YY-MM are the year and month in digits.  A useful World Wide
  Web interface to recent mailings is currently kept at
        http://www-stud.enst.fr/~tardieu/mailarchive/zsh-list/index.html
  by Samuel Tardieu.
@


2.16
log
@checked in with -k by hzoli at 1996/07/25 20:32:43
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.16 1996/07/25 08:08:47 pws Exp $
d9 9
a17 10
- in A3: updated configuration information;  deleted some machine-
         specific information more useful contained in Etc/MACHINES;
         referred to that.
- in A4: new version; note coming 3.0 release.
- in B1: mention `emulate' command to emulate ksh.
- in C7: another way of getting a newline into a prompt.
- in D1: mention ^xg.
         Other minor wording changes in section D.
- in Z1: most recent shell changes (mainly for POSIX), mention quoting
         in prompts, separate 2.5 and 3.0 changes.
d111 3
a113 3
  (As a lower-tech method of reading this 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.)
d121 7
a127 6
  Zsh is a UNIX command interpreter (shell) which of the standard shells
  most resembles the Korn shell (ksh), although it is not completely
  compatible.  It includes enhancements of many types, notably in the
  command-line editor, options for customising its behaviour, filename
  globbing, features to make C-shell (csh) users feel more at home and
  extra features drawn from tcsh (another `custom' shell).
d201 5
a205 13
  Zsh 2.5.0 was the last major release:  the final form is 2.5.03.
  Many bugs were fixed after 2.3.1, which was the previous major
  release, and there were many new features, notably programmable
  completion.  This version is known to have a bug with pipelines
  inside other shell structures (now fixed in 2.6).

  The release of zsh 3.0 is imminent; currently 3.0-pre4 is available.
  Major zsh sites are particularly encouraged to download this and
  report any bugs.  The new major number 3.0 largely reflects the
  considerable internal changes in zsh to make it more reliable,
  consistent and (where possible) compatible.  Those planning on
  upgrading their zsh installation when 3.0 appears should take a look
  at the list of incompatibilities at the end of Z1).  This is longer
d208 5
a212 6
  Note that even numbered minor versions are not released.  Development
  of zsh is usually 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.
  
d326 23
a348 1
  on the 11/16/88f version of ksh.
d356 1
a356 1
  
d362 5
a366 8
  NO_SHORT_LOOPS, PROMPT_SUBST, RM_STAR_SILENT, SH_GLOB, SH_WORD_SPLIT
  (see question C4) 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 and set suitable options.
  
  From 3.0, the command `emulate' is also available: `emulate ksh' and
  `emulate sh' set various options as well as changing the effect of
  single-letter option flags.
d373 2
a374 3
  if `emulate ksh' is in effect; those marked - have recently (i.e.,
  between the release and the beta version) become ksh-compatible.
  Capitalised words with underlines refer to shell options.
d382 1
a382 3
      The KSH_ARRAYS option is available from version 2.6-beta17; note
      even in this case $array[2] with no braces refers to element 2
      of $array, etc.
a383 3
  - Opening for both input and output via <> is only available from
      2.6-beta21; before it performed globbing of any sequence of
      decimal digits.  For the latter, you now need <->.
d389 1
a389 4
      (GLOB_SUBST has just been added to fix this.)
  - On the other hand, `foo=*' does globbing immediately on the right
      hand side of the assignment (this has changed from 2.6-beta17;
      the old behaviour now requires the option GLOB_ASSIGN).
d426 1
a426 3
      function to the calling level). 
  - Up to version 2.5, autoloaded functions just contained the body of
      the function: see C5).
d428 1
a428 3
    Traps are not local to functions, are not reset automatically when
      called, and are called as functions themselves (this is a bug
      for the `trap "..." NAL' form of trap setting). 
d473 3
a475 2
    Alternative syntax `if ( ... ) ...' (also `for', `which'; this now
      requires the CSH_JUNKIE_PAREN option).
d707 1
a707 1
  external programmes.  This is partially implemented already: in 2.5,
d767 1
a767 1
  or when `emulate ksh' or `emulate sh' are in effect.
d772 5
a793 7
  The shell has just (version 2.6 beta 5) been enhanced to allow the
  Korn shell syntax, where the file contains the whole function
  including the definition lines.  However, the form given above is
  unlikely to disappear as it allows significant benefits, including
  using a function directly as a script, and being able to link a
  function under different names.

d803 1
a803 2
  (note that `foo=$((16#ff))' is supported from version 2.6 onward).
  The original syntax was
d1124 10
a1133 4
  From 3.0-pre3, [[, { and } are reserved words, hence must be
    separated from other characters by whitespace.  From 3.0-pre4
    { and } work again without whitespace if the IGNORE_BRACES option
    is not set.
d1139 10
a1148 6
  From 2.6.beta21, <> performs redirection of input and output to the
    specified file.  For numeric globs, you now need <->.
  From 2.6.beta20, the command line qualifiers exec, noglob, command,
    - are now treated more like builtin commands:  previously they
    were syntactically special.  This should make it easier to perform
    tricks with them (disabling, hiding in parameters, etc.).
a1166 25
  Changes present in zsh 2.5:
  Assignment of `...` and $(...) to variables in the form `foo=$(...)'
    is now always scalar; previously the command output was split and
    array assignment performed if more than one word resulted.  You
    can still generate an array vie `foo=($(...))', which was always
    the safe way of doing it.  Again, this is for Bourne/Korn
    compliance.  (Note the same is true for globbing, as mentioned
    in B1) above.)
  The -h option to compctl has been removed (use `-k hosts' for the
    same effect); automatic handling of hosts after '@@' has been removed
    (use e.g. `compctl -u -x "n[-1,@@]" -k hosts -- finger').
  Handling of backslashes in `echo' and `print' has changed.
  umask's behaviour with respect to symbolic operators has reversed
    (and is now ksh-compatible).
  The option CSH_JUNKIE_TILDE has been upgraded to GLOB_SUBST: instead
    of just ~'s and ='s, all characters become eligible for file
    expansion and globbing when the option is set.  (The option was
    not present in 2.3 at all.)
  The corresponding one-time switches ${~...}, ${^.,.} and ${=...},
    now force the corresponding options on for the evaluation, rather
    than toggling (double the character to force off).
  "${#foo}" (with the quotes) now gives an array length if `foo' is an
    array.  ("${(c)#foo}" gives the total character length.)
  

d1244 1
a1244 1
wizzo extended completion is by Sven Wishnowsky).
d1249 1
a1249 1
This document is copyright (C) P.W. Stephenson, 1995. This text
a1260 1

@


2.15
log
@checked in with -k by hzoli at 1996/07/10 12:36:47
@
text
@d2 1
a2 1
Last-Modified: 1996/06/26
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.15 1996/06/26 07:15:21 pws Exp $
d9 10
a18 7
- in A4: new beta version
- in A5: updated archive list
- in A6: extended 'exec zsh' for login files from Bart Schaefer
- in B1: added more prominent note on word splitting; other entries updated
- in C1: mention globbing
- in Z1: <> now does redirection, not numeric globbing. *NB!*,
         exec, noglob etc. behaviour changed
a111 7
  Note that if you are reading this file with GNU Emacs 19 and have my
  cross-referencing package xref.el (soon to be part of Emacs, but
  currently available from
  http://python.swan.ac.uk/~pypeters/comp/xref.html), you can pick up
  a version of this FAQ which is internally cross-referenced from:
  http://python.swan.ac.uk/~pypeters/comp/zsh.FAQ

d175 11
a185 13
  Zsh was written for machines of the Berkeley UNIX family; most such
  machines (and all the most popular) will run it without major
  surgery.  Modifications have been made so that it works under
  SYSVR4-based operating systems such as Solaris 2.x and OSF/1.  The
  best thing is to suck it and see.  Success has been obtained on
  older SYSVR3 systems, but you may need to modify the code.

  From version 2.6, the installation mechanism has been altered to use
  GNU Autoconf, which should make it easier to recognise new machine
  types.  If you need to change something to support a new machine, it
  would be appreciated if you could add any necessary preprocessor
  code and alter configure.in to configure zsh automatically, then
  send the required context diffs to the list (see question Z2).
d189 2
a190 19
  directory.  Here are a couple of known installation problems at
  present.

  *Note for Solaris 2.2 and 2.3*: The UCB versions of the routines for
  reading directories are not usable (the struct definitions are
  incompatible with the ones assumed by zsh).  The symptom of this is
  that globbed filenames in the compiled version of zsh will be
  missing the first two letters.  To avoid this, make sure you compile
  zsh without any reference to /usr/ucblib in (e.g.) your
  LD_LIBRARY_PATH.

  *Note for OSF/1 3.0*: There is apparently a bug in the header file
  /usr/include/rpcsvc/ypclnt.h; the prototype for yp_all() has a
  struct ypall_callback as its final argument, which should be a
  pointer (struct ypall_callback *).  This prevents compilation of
  zle_tricky.c.  If you can't modify the header file, make a
  subdirectory called rpcsvc, copy ypclnt.h there, modify that copy,
  and put a `-I.' argument into CFLAGS in Makefile for the Src
  subdirectory when compiling.
d207 21
a227 11
  Work has now started on 2.6 and 2.6-beta22 is available; note that
  even numbered minor versions are not released.  Development of zsh
  is usually 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.  Note also that as the shell
  changes, it may become incompatible with older versions; see the
  end of question Z1 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.
d353 4
d359 7
a365 7
  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'; those
  marked - have recently (i.e., between the release and the beta
  version) become ksh-compatible.  Capitalised words with underlines
  refer to shell options. 
d426 2
d583 3
a585 3
  lete2ctl in the scripts directory of the source distribution to
  convert `complete' to `compctl' statements.)  This list is not
  definitive: some features have gone in the other direction.
d606 8
a613 6
  On the other hand, zsh has no claims towards Posix compliancy and will
  not use GNU readline (zle is more powerful).  In fact, bash is
  intended more as an enhanced sh than a ksh work-alike; it doesn't
  handle [[ ... ]], or (yet) arrays, for example.  Of course, they're
  working on bash, too.  Some zsh-like features are suggested for
  future versions.
d768 2
a769 1
  Shwordsplit is set when zsh is invoked with the names `ksh' or `sh'.
d838 3
a840 1
  free to write this :-).
d927 5
a931 3
  it does that, otherwise it tries to perform completion.  Expansion
  is generally fairly intuitive and not under user control; for the
  rest of the section I will discuss completion only.
d946 1
a946 1
  and try to complete that.
d996 2
a997 1
  completion.  Combinations of these are possible.
d1117 1
d1127 11
d1156 7
a1162 9
  An option CSH_JUNKIE_PAREN has proved necessary for the syntax `if (
    <condition> ) <code>' and for similar `for' and `while' (but not
    `foreach') commands.  This is because it is valid Bourne/Korn shell
    syntax to have a subshell command immediately after if, and the
    default syntax should be compliant with that.
  You also need CSH_JUNKIE_PAREN if you want to use the syntax
    `if [[ ... ]] command' (maybe with `command' being in the form `{
    command1; ...}'; this was mainly here for csh compatibility.
    Remember you can use `[[ ... ]] && command' to do the same thing.
d1180 3
a1182 3
  The corresponding one-time switch ${~...}, together with ${^.,.}
    and ${=...}, now force the corresponding options on for the
    evaluation, rather than toggling (double the character to force off).
a1184 2
  The PROMPT_SUBST option now performs backquote expansion -- hence
    you should quote these in prompts.  (SPROMPT has changed as a result.)
d1222 1
a1222 1
        comeman@@math.gatech.edu
d1281 1
@


2.14
log
@checked in with -k by hzoli at 1996/07/10 12:36:42
@
text
@d2 1
a2 1
Last-Modified: 1996/06/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.14 1996/06/25 07:41:33 pws Exp $
d230 1
a230 1
  Work has now started on 2.6 and 2.6-beta21 is available; note that
d360 1
a360 1
  in some versions of ksh), KSH_ARRAY, KSH_OPTION_PRINT, LOCAL_OPTIONS,
d362 4
a365 4
  NO_SHORT_LOOPS, PROMPT_SUBST, RM_STAR_SILENT, SH_WORD_SPLIT (see
  question C4) 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 and set suitable options.
a1134 3
  The keys for forward/reverse search in vi mode, / and ?, have been
    reversed: the intention is to provide vi rather than ksh compatibility.
    (This change still appears to be controversial.)
@


2.13
log
@checked in with -k by hzoli at 1996/07/10 12:36:37
@
text
@d2 1
a2 1
Last-Modified: 1996/04/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.13 1996/06/25 07:40:55 pws Exp $
@


2.12
log
@checked in with -k by hzoli at 1996/07/10 12:36:32
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.12 1996/05/24 07:55:05 pws Exp $
d10 6
a15 16
- in A5: new archive maintainer and site (and changed acknowledgments);
         changed lut archive address
- in B1: correct typo **/foo~bar -> **/foo~*bar*;
         non-decimal integers now do have base# prefixed;
         note KSH_ARRAYS, GLOB_ASSIGN options.
- in B2: note about >& and 2>&1.
- in B5: mention bash doesn't currently have arrays :-).
- in B6: turned csh-whynot location into URL & made it http.
- in C4: mention IFS in article on splitting; correct `$var/$vble' typo.
- new C13: how to list all history entries.
- in Z1: note ~ to = change for references to directory stack;
         also vi keys for history search reversed;
         added to name of item;
         deleted bugs fixed in new version;
         added several new incompatibilities.
- in Z2: coleman@@math.gatech.edu
d52 1
a52 1
C1) How do I turn off spelling correction for an individual command?
d230 1
a230 1
  Work has now started on 2.6 and 2.6-beta17 is available; note that
d251 12
a262 1
    USA		ftp://ftp.math.gatech.edu/pub/zsh/
d264 2
a265 10
		ftp://ftp.sterling.com/zsh/
		ftp://ftp.rge.com/pub/shells/zsh/
    France	ftp://ftp.cenatls.cena.dgac.fr/pub/shells/zsh/
    UK		ftp://ftp.net.lut.ac.uk/zsh/
		(also by FSP at port 21)
    Germany	ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/
                fpt://ftp.uni-trier.de/pub/unix/shell/zsh/
    Norway	ftp://ftp.uit.no/pub/unix/shells/zsh/
    Australia	ftp://ftp.ips.oz.au/pub/packages/zsh/
    Japan       ftp://ftp.tohoku.ac.jp/mirror/zsh-hzoli/
d296 1
a296 1
	[ -f $HOME/bin/zsh ] && exec $HOME/bin/zsh -l
d298 1
a298 1
	if ( -f ~/bin/zsh ) exec ~/bin/zsh -l
d301 15
d350 9
a358 2
  Various options can be turned on which will increase ksh
  compatibility, though decrease zsh's abilities: see the manual
d360 6
a365 7
  in some versions of ksh), KSH_OPTION_PRINT, NO_BAD_PATTERN,
  NO_BANG_HIST, NO_EQUALS, NO_HUP, NO_NOMATCH, NO_RCS, NO_SHORT_LOOPS,
  PROMPT_SUBST, RM_STAR_SILENT, SH_WORD_SPLIT (see question C4) and
  SINGLE_LINE_ZLE.  Of these, SH_WORD_SPLIT and NO_NOMATCH are the
  most likely to spoil your ksh scripts if unset.  Note that you can
  also disable any built-in commands which get in your way.  If
  invoked as `ksh', the shell will try and set suitable options.
d371 4
a374 2
  ksh-like manner if the shell is invoked with the name `ksh'.
  Capitalised words with underlines refer to shell options.
d377 1
a377 2
  * Shell word splitting: see question C4).  (This is particularly
      frequently asked about; use SH_WORD_SPLIT.)
d386 3
a388 2
    Opening for both input and output via <> is not yet supported.
      (This syntax does numeric globbing.)
d395 1
a395 1
    On the other hand, `foo=*' does globbing immediately on the right
d401 1
a401 4
    The $((...)) version of numeric evaluation was not available before
      version 2.6 (use $[...]).
    $PSn do not do parameter substitution by default (use PROMPT_SUBST:
      this still needs some fixing for complex substitutions).
d413 1
a413 1
      The `^' and ~ forms and the two with `#' require EXTENDED_GLOB.
a420 1
    The right hand side of an assignment is globbed in zsh.
d432 3
d436 3
a438 3
    Traps and options are not local to functions; traps are not reset
      automatically when called; traps are called as functions themselves
      (this is a bug for the `trap "..." NAL' form of trap setting).
d481 1
a481 3
      csh's `>&file'.  If you define a function incorporating the
      latter, then look at it with the `functions' command or `which',
      you will see it has been converted to the former.)
d495 1
a495 1
	alias newcmd='list of commands'
d497 1
a497 1
	alias newcmd 'list of commands'
d506 1
a506 1
	alias cd 'cd \!*; echo $cwd'
d508 1
a508 1
	cd() { builtin cd $*; echo $PWD; }
d511 1
a511 1
	cd() { builtin cd $*; print -D $PWD; }
d542 1
a542 1
        (assuming shwordsplit is NOT set in zsh):
d560 2
a561 2
	function, $5 is the empty string if there are 4 or fewer
	parameters.)
d596 1
a596 1
	bindkey -s '^z' '\eqfg %$EDITOR:t\n'
d649 1
a649 1
C1) How do I turn off spelling correction for an individual command?
d651 4
a654 4
  You presumably have `setopt correctall' in an initialisation file, so
  that zsh checks the spelling of each word in the command line.  You
  probably do not want this behaviour for commands which do not operate
  on existing files.
d660 4
d672 1
a672 1
	[[ $TERM = "xterm" ]] && stty pass8 && bindkey -me
d674 1
a674 1
	[[ $TERM = "xterm" ]] && stty -parenb -istrip cs8 && bindkey -me
d693 1
a693 1
	ttyctl -u
d705 2
a706 2
	ttyctl -u
	STTY='lnext "^-"' commandname
d722 1
a722 1
	var="foo bar"
d730 1
a730 1
	args() { echo $#; }
d732 1
a732 1
	args $var
d734 1
a734 1
	setopt shwordsplit
d743 1
a743 1
	set -A array one two three twenty
d747 1
a747 1
	args $array
d749 4
a752 1
  Arrays are also much more versatile than single strings.
d755 1
a755 1
  separator, $IFS; in other words, with `IFS=: foo=a:b; args $foo' you
d760 2
a761 2
 	sentence="Longtemps, je me suis couch\\'e de bonne heure."
	eval "words=(\"$sentence\")"
d765 1
a765 1
	args ${=sentence}
d813 1
a813 1
	(( foo = [16]ff ))
d817 1
a817 1
	echo $foo
d820 1
a820 1
	typeset -i foo
d825 1
a825 1
	typeset -i 10 foo
d834 2
a835 2
	PROMPT="Hi Joe,
	what now?%# "
d956 1
a956 1
	hosts=(fred.ph.ku.ac.uk snuggles.floppy-bunnies.com here.there.edu)
d959 1
a959 1
	compctl -k hosts telnet ftp ...
d968 1
a968 1
	compctl -g '*.(ps|eps)' ghostview
d976 1
a976 1
	compctl -k hosts -f rcp
d1011 1
a1011 1
	compctl -g '*.ps' + -f lpr
d1047 2
a1048 2
	compctl -k hosts -S ':' + -f -x 'n[1,:]' -f - \
	  'n[1,@@]' -k hosts -S ':' -- rcp
d1078 2
a1079 2
	compctl -f -x 'c[-1,-u][-1,-U] p[2], s[-u]' -u - \
	  'c[-1,-j]' -P % -j -- foobar
a1119 1
  Autocd won't use globbed filenames.
d1125 6
d1137 1
d1144 2
a1145 1
  The `HISTCHARS' variable is now `histchars'.
d1186 1
a1186 1
	zsh-workers@@math.gatech.edu
d1193 1
a1193 1
	zsh-users@@math.gatech.edu
d1196 1
a1196 1
	zsh-announce@@math.gatech.edu
d1208 1
a1208 1
	zsh-workers-request@@math.gatech.edu
d1210 1
a1210 1
	subscribe <your-email-address>
d1212 1
a1212 1
	Subject:  subscribe P.Stephenson@@swansea.ac.uk
d1216 1
a1216 1
	comeman@@math.gatech.edu
d1219 1
a1219 1
	ftp://ftp.sterling.com/zsh/zsh-list/YY-MM
@


2.11
log
@checked in with -k by hzoli at 1996/07/10 12:36:28
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.11 1996/04/25 09:07:15 pws Exp $
d9 17
a25 2
- in A4: latest beta is now 2.6-beta15
- in Z1: note `trap' bugs
d74 1
d84 1
a84 1
Z1) What bugs are currently known and unfixed?
d240 1
a240 1
  Work has now started on 2.6 and 2.6-beta15 is available; note that
d255 1
a255 1
  Richard Coleman <zsh@@math.gatech.edu> is in charge of the archive.
d260 7
a266 5
    USA		ftp://ftp.math.gatech.edu/pub/zsh
		ftp://ftp.sterling.com/zsh
		ftp://ftp.rge.com/pub/shells/zsh
    France	ftp://ftp.cenatls.cena.dgac.fr/pub/shells/zsh
    UK		ftp://mrrl.lut.ac.uk/zsh
d268 5
a272 3
    Germany	ftp://ftp.fu-berlin.de/pub/unix/shells/zsh
    Norway	ftp://ftp.uit.no/pub/unix/shells/zsh
    Australia	ftp://ftp.ips.oz.au/pub/packages/zsh
a285 6
  There is another similar version with a few extra features and bug
  fixes, most of which will eventually propagate to the `official'
  version.  It is maintaind by Zoltan Hidvegi <hzoli@@cs.elte.hu> and
  is available from
        ftp://bolyai.cs.elte.hu/pub/zsh/

d363 1
a363 1
    Arrays are more csh-like than ksh-like:
d367 3
d380 2
a381 1
      hand side of the assignment (the default behaviour may change).
d402 1
a402 1
        precedence than `/'.  For example, `**/foo~bar' matches any
d409 2
a410 3
    Unquoted assignments do file expansion after ':'s (intended for PATHs).
    `integer' does not allow -i; integers in bases other than 10 do not
      have "base#" prefixed to them when printed.
d465 4
d600 6
a605 4
  However, zsh has no claims towards Posix compliancy and will not use
  GNU readline (zle is more powerful).  In fact, bash is intended more
  as an enhanced sh than a ksh work-alike; it doesn't handle [[ ... ]],
  for example.
d622 4
a625 3
    rtfm.mit.edu:pub/usenet-by-group/news.answers/unix-faq/shell/csh-whynot
  if you are in any doubt) and zsh is able to run many standard scripts
  such as /etc/rc.
d714 2
a715 2
  and with our definition of vble,
	args $vble
d734 4
d881 6
d1085 1
a1085 1
Z1) What bugs are currently known and unfixed?
a1093 5
  The parameter substitution code has a number of bugs, fixed in the
    alternative version mentioned in A5).
  There are various bugs with the execution of traps for signals and
    related signal handling for which patches exist, but these have
    not yet appeared in the archive. 
a1095 3
  The `HISTLIT' option is broken in various ways and is being removed:
    the rewritten history mechanism doesn't alter history lines, making
    the option unnecessary (from zsh-2.6-beta12).
a1101 2
  Builtins at the end of a pipeline lose their status to previous
    commands (fixed from 2.6 beta8).
d1106 13
d1132 3
a1134 1
    the safe way of doing it.  Again, this is for Bourne/Korn compliance.
d1145 8
d1189 1
a1189 2
	zsh@@math.gatech.edu
  (his own e-mail address is coleman@@math.gatech.edu).
d1226 6
a1231 6
regarding this document; thanks to Jim Mattson, Bas de Bakker and now
Richard Coleman for their hard work as archivists, and to Peter Gray
for maintaining the mailing list, without which zsh might easily have
died, and to his successor, Rick Ohnemus.  The world is eternally in
the debt of Paul Falstad for inventing zsh in the first place (though
the wizzo extended completion is by Sven Wishnowsky).
@


2.10
log
@checked in with -k by hzoli at 1996/07/10 12:35:54
@
text
@d2 1
a2 1
Last-Modified: 1996/01/24
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.10 1996/03/25 15:22:13 pws Exp $
d9 2
a10 2
- In Z1:  mention substitution bugs
- In Z2:  deleted change of address note
d224 1
a224 1
  Work has now started on 2.6 and 2.6-beta13 is available; note that
d1062 3
@


2.9
log
@checked in with -k by hzoli at 1996/07/10 12:33:12
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.9 1996/01/24 12:48:00 pypeters Exp pypeters $
d9 2
a10 1
- In A5:  expanded reference to URL's in FTP addresses
d143 1
a143 1
  freely-available shell which zsh does not also have.
a270 2
  (links to the Hungarian academic network from the rest of Europe are
  expected to improve shortly).
d1060 2
d1108 1
a1108 1
  subscribers to the mailing list (NOTE CHANGE OF ADDRESS),
@


2.8
log
@checked in with -k by hzoli at 1996/07/10 12:30:29
@
text
@d2 1
a2 1
Last-Modified: 1995/11/07
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.8 1995/11/24 12:53:15 pypeters Exp $
d6 1
a6 1
Copyright: (C) P.W. Stephenson, 1995 (see end of document)
d9 1
a9 10
- In A4: new beta version
- In A5: flag hzoli release
- In B1: $(echo '\$x') expansion different from ksh
         longer note about ~ as glob operator
-    C3: title changed
- In C4: minor changes of wording
- In Z1: changed HISTLIT bug item
	 `time' can now be used with (...) (still not {...} or
           builtins);  time in subshells now works, so deleted bug item.
- In Z2: flag WWW list archive
d192 1
a192 1
  reading directories are not usable (the struct definitions are2
d203 4
a206 3
  zle_tricky.c.  If you can't modify the header file, copy it to the
  current directory, modify that copy, and put a `-I.' argument into
  CFLAGS in Makefile for the Src subdirectory when compiling.
d223 1
a223 1
  Work has now started on 2.6 and 2.6-beta12 is available; note that
d254 4
a257 1
  the hostname and the remainder after the / is the directory.)
a1197 1

@


2.7
log
@checked in with -k by hzoli at 1996/07/10 12:29:55
@
text
@d2 1
a2 1
Last-Modified: 1995/10/24
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.7 1995/10/24 11:02:24 pypeters Exp pypeters $
d8 12
d45 1
a45 1
 
d57 1
a57 1
C3) Why does my terminal act funny in way x?
d118 1
a118 1
  (As a lower-tech method of reading this in Emacs, you can type 
d152 1
a152 1
  
d187 1
a187 1
  
d201 1
a201 1
  reading directories are not usable (the struct definitions are
d224 1
a224 1
  
d231 1
a231 1
  Work has now started on 2.6 and 2.6-beta10 is available; note that
d270 8
d286 1
a286 1
  
d298 1
a298 1
  (in each case the -l tells zsh it is a login shell).  
d351 1
a351 1
  
d370 3
d382 1
a382 1
                      or   foo1~foo2     Anything matching foo1 but foo2.
d389 7
d416 1
a416 1
      Use bindkey to change the editing behaviour: `set -o {emacs,vi}' 
d498 1
a498 1
    
d608 1
a608 1
  
d624 1
a624 1
  
d645 1
a645 1
C3) Why does my terminal act funny in way x?
d686 1
a686 1
  In most Bourne-shell derivatives, multi-word variables such as
d692 1
a692 1
  
d701 1
a701 1
  
d724 2
a725 1
  always returns 8 with the above definition of `args'.
d729 1
a729 2
  word splitting), also the substitution ${=foo} to turn on word
  splitting on variable `foo'.
d731 1
a731 1
  Shwordsplit is set when zsh is invoked with the name `ksh'.
d795 1
a795 1
  inhibits such behaviour, you will have to bracket this with 
d798 1
a798 1
  
d1037 1
a1037 1
  if it's not there already and complete job names.  Otherwise, just 
d1068 4
a1071 6
  The `histlit' option adds newlines to lines in the history (and is
    broken in several other ways, e.g. !:x word selection; it may be
    removed).
  `time' is ignored with builtins and can't be used with {...} or (...);
    in shells with no job control the command name is blank (last
    fixed from 2.6 beta11.) 
d1113 1
a1113 1
	zsh-workers@@math.gatech.edu 
d1117 1
a1117 1
  
d1148 4
a1151 1
  where YY-MM are the year and month in digits.
@


2.6
log
@checked in with -k by hzoli at 1996/07/10 12:29:39
@
text
@d2 1
a2 1
Last-Modified: 1995/9/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.6 1995/09/25 15:27:54 pypeters Exp $
d35 1
a35 1
B1) sh and ksh? 
d38 1
a38 1
B4) tcsh? 
d176 6
a181 7
  From version 2.6, the installation mechanism has recently been
  altered to use GNU Autoconf, which should make it easier to
  recognise new machine types.  If you need to change something to
  support a new machine, it would be appreciated if you could add any
  necessary preprocessor code and alter configure.in to configure zsh
  automatically, then send the required context diffs to the list (see
  question Z2).
d204 6
d219 1
a219 1
  Work has now started on 2.6 and 2.6-beta9 is available; note that
a306 1

d958 3
a960 1
  whole lot ends with a double -- before the command name.
@


2.5
log
@checked in with -k by hzoli at 1996/07/10 12:29:20
@
text
@d2 1
a2 1
Last-Modified: 1995/7/18
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.5 1995/07/18 15:26:20 pypeters Exp $
d125 2
a126 2
  the mailing list (see question Z2).  It is freely available to
  anyone under unrestrictive conditions.
d191 5
a195 4
  incompatible with the ones assumed by zsh).  Make sure you compile
  without any reference to /usr/ucblib in (e.g.) your LD_LIBRARY_PATH.
  The symptom of this is that globbed filenames will be missing the
  first two letters.
d236 1
a236 1
		ftp://ftp.rge.com/pub/zsh
d1036 2
a1037 1
    in shells with no job control the command name is blank.
@


2.4
log
@checked in with -k by hzoli at 1996/07/10 12:28:45
@
text
@d2 1
a2 1
Last-Modified: 1995/6/23
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.4 1995/06/23 11:10:23 pypeters Exp $
d89 6
a94 1
  mention here.)
d240 1
d343 2
d347 2
a348 2
    Treatment of backslashes within backquotes is subtly different.
    $PSn do not do parameter substitution by default (use PROMPT_SUBST).
d574 5
a578 4
  Of course, this makes zsh rather large and quite messy so that it
  seems to appeal mainly to hackers.  The only answer, perhaps not
  entirely satisfactory, is that you have to ignore the bits you don't
  want.
d1042 1
a1042 1
    commands (now fixed in 2.6 beta8).
a1043 2
  Redirecting input to a shell function can have unfortunate effects
    on the shell's standard input.
d1120 5
a1124 5
  Mostly, a lot of the code needs a major clean-up:  particular
  offenders are the history code (hist.c), parameter code (params.c)
  and substitution code (subst.c).  A more efficient set of code for
  lexing/parsing/execution might also be an advantage.  Volunteers are
  particularly welcome for these tasks.
@


2.3
log
@checked in with -k by hzoli at 1996/07/10 12:28:04
@
text
@d2 1
a2 1
Last-Modified: 1995/5/24
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.3 1995/05/24 09:37:04 pypeters Exp $
d79 3
a81 2
  is "http://www.mal.com/zsh".  The server provides this FAQ and much
  else (thanks to Mark Borges for this).
d91 2
a92 2
  The latest version of this FAQ is also available directly from the
  main zsh archive site given in question A5).
d105 3
d202 3
a204 3
  Zsh 2.5.0 has recently been released; the final form is 2.5.03.
  Many bugs have been fixed since 2.3.1, which was the last major
  release, and there are many new features, notably programmable
d208 1
a208 1
  Work has now started on 2.6 and 2.6-beta8 is available; note that
d223 1
a223 1
  Richard Coleman (zsh@@math.gatech.edu) is in charge of the archive.
d228 5
a232 5
    USA		ftp.math.gatech.edu:/pub/zsh
		ftp.sterling.com:/zsh
		ftp.rge.com:/pub/zsh
    France	ftp.cenatls.cena.dgac.fr:/pub/shells/zsh
    UK		mrrl.lut.ac.uk:/zsh
d234 5
a238 2
    Germany	ftp.fu-berlin.de:/pub/unix/shells/zsh
    Australia	ftp.ips.oz.au:/pub/packages/zsh
d939 2
d1020 2
a1021 4
  Certain built-ins won't allow the `VAR=value command ...' assignment.
    N.B.: `exec foo=bar command' is a workaround for exec.  Also, from 2.6
    builtins should correctly unset VAR after the command, except
    for special variables (bug) and typeset/export commands (deliberate).
d1104 1
a1104 1
	ftp.sterling.com:zsh/zsh-list/YY-MM
d1113 6
d1156 1
a1156 1
Wide Web at URL http://www.mal.com/zsh".
@


2.2
log
@checked in with -k by hzoli at 1996/07/10 12:26:27
@
text
@d2 1
a2 1
Last-Modified: 1995/4/24
d4 1
a4 1
Version: $Id: zsh.FAQ,v 2.2 1995/04/24 09:21:18 pypeters Exp $
d79 2
a80 2
  is "http://www.mal.com/zsh/zsh_home.shtml".  The server provides
  this FAQ and much else (thanks to Mark Borges for this).
d100 4
d204 1
a204 1
  Work has now started on 2.6 and 2.6-beta5 is available; note that
d221 2
a222 1
  first is the official archive site.
d229 1
d299 7
a305 7
  in some versions of ksh), KSH_OPTION_PRINT, NO_BANG_HIST, NO_EQUALS,
  NO_HUP, NO_NOMATCH, NO_RCS, NO_SHORT_LOOPS, PROMPT_SUBST,
  RM_STAR_SILENT, SH_WORD_SPLIT (see question C4) and SINGLE_LINE_ZLE.
  Of these, SH_WORD_SPLIT and NO_NOMATCH are the most likely to spoil
  your ksh scripts if unset.  Note that you can also disable any
  built-in commands which get in your way.  If invoked as `ksh', the
  shell will try and set suitable options.
d346 1
a359 1
    By default, background jobs are killed when you log out:  see C12).
a383 2
      The behaviour of ((...)) has just changed so that a `$foo' here is
      also treated as a single number.
d528 6
a533 6
  than it sounds.  With the new malloc by Sven Wischnowsky (only used if
  you arranged for USE_ZSH_MALLOC to be defined in config.h when
  compiling zsh), zsh uses about the same amount of heap memory as bash,
  which was previously the biggest gripe.  The only feature I am aware
  of that zsh doesn't have is setting a numerical value for ignoreeof
  --- it's always 10 --- but of course I don't use bash :-).
d934 2
a935 2
  and possible other condition/flag sets following a single -; the
  whole lot ends with a double --.
d981 1
a981 1
  the current one is -f, insert the prefix `%' before the current word
d1025 2
a1026 1
  Builtins at the end of a pipeline lose their status to previous commands.
d1028 2
a1057 5
  There is at least one common bug which is not due to zsh.  If you have
  abnormal behaviour with file descriptor 4, it's because your password
  database is being read from the Network Information System and
  getpwent() left this fd open.

d1062 5
a1066 5
  subscribers to the mailing list,
	zsh-list@@sterling.com so any suggestions, complaints,
  questions and matters for discussion should be sent there.  If you
  want someone to mail you directly, say so.  Most patches to zsh appear
  there first.
d1068 27
a1094 20
  A lower-volume list,
	zsh-announce@@sterling.com
  exists for announcements of new features and proposed changes
  requiring some decisions.

  Both lists are handled by an automated server.  The instructions for
  zsh-announce are the same as for zsh-list: just change zsh-list to
  zsh-announce everywhere in the following.

  To join zsh-list, send email to
	Majordomo@@sterling.com
  containing
	subscribe zsh-list <optional-address>
  where <optional-address> can be blank if you want to subscribe from
  your current email address.  Send the message `help' to the same
  address for help on the list server; `unsubscribe zsh-list' also
  works. (Don't send this to the list!) The list manager, Rick Ohnemus,
  can be reached at
	owner-zsh-list@@sterling.com
  (or `rick' at the same address).
d1125 3
a1127 3
died, and to the latest list maintainer, Rick Ohnemus.  The world is
eternally in the debt of Paul Falstad for inventing zsh in the first
place (though the wizzo extended completion is by Sven Wishnowsky).
d1139 1
a1139 1
notice and the appears in all copies of this documentation.  Remember,
d1141 3
a1143 1
to provide a pointer to it rather than the entire text.
@


1.34
log
@mods for posting
@
text
@d2 1
a2 1
Last-Modified: 1995/2/24
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.33 1995/01/30 10:52:43 pws Exp pws $
d6 1
d11 1
a11 7
Zsh is more powerful than every other common shell (sh, ksh, csh, tcsh
and bash) put together.

Information on zsh is now available via the World Wide Web.  The
address is in transition, but you can currently use
"http://mal9000.bevc.blacksburg.va.us/zsh/zsh_home.shtml".  The server
provides this FAQ and much else (thanks to Mark Borges for this).
d17 102
a118 7
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.  (This article
also talks about shell startup files which would otherwise rate a
mention here.)
d120 1
a120 3
If you just want to know how to get your hands on the latest version,
skip to question 4); if you want to know what to do with insoluble
problems, go to 22).
d122 6
a127 7
To encourage you to read on, if you don't know about zsh but are
familiar with other UNIX shells, here are some things that zsh is
particularly good at.  No claim of exclusivity is made, especially as
shells copy one another, though in the areas of command line editing and
globbing zsh is well ahead of the competition.  I am not aware of a
major feature in any other freely-available shell which zsh does not
also have.
d147 1
a147 1
    (now including conditional expressions).
a152 2
Notation: Quotes `like this' are ordinary textual quotation
marks.  Other uses of quotation marks are input to the shell.
d154 1
a154 52
If you are reading this file with GNU Emacs 19 and have my
cross-referencing package xref.el (available from
suna.amtp.liv.ac.uk:/pub/pws), I can supply a suitable set of
cross-references to make reading the file easier.

Contents:
1) What is it?
2) On what machines will it run?  (Plus important compilation notes)
3) What's the latest version?
4) Where do I get it?
5) How does zsh differ from sh, ksh, csh, tcsh, bash?
6) Why do my csh aliases not work?  (Plus other alias pitfalls.)
7) How do I turn off spelling correction for an individual command?
8) How do I get the meta key to work on my xterm?
9) Why does my terminal act funny in way x?
10) Why does `$var' where var="foo bar" not do what I expect?
11) Why do my autoloaded functions not autoload [the first time]?
12) How does base arithmetic work?
13) How do I get a newline in my prompt?
14) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
15) Why can't I bind \C-s and \C-q any more?
16) How do I execute command `foo' within function `foo'?
17) Why do history substitutions with single bangs do something funny?
18) Why does zsh kill off all my background jobs when I logout?
19) I don't have root access: how do I make zsh my login shell?
20) Shouldn't zsh be more/less like ksh/(t)csh?
21) What bugs are currently known and unfixed?
22) Where do I report bugs, get more info / who's working on zsh?
23) What's on the wish-list?
--- End of Contents ---


1) What is it?

  Zsh is a UNIX command interpreter (shell) which of the standard shells
  most resembles the Korn shell (ksh), although it is not completely
  compatible.  It includes enhancements of many types, notably in the
  command-line editor, options for customising its behaviour, filename
  globbing, features to make C-shell (csh) users feel more at home and
  extra features drawn from tcsh (another `custom' shell).

  It was written by Paul Falstad when a student at Princeton; however,
  Paul doesn't maintain it any more and enquiries should be sent to
  the mailing list (see question 22).  It is freely available to
  anyone under unrestrictive conditions.

  For more information, the files doc/intro.txt or doc/intro.troff
  included with the source distribution are highly recommended.  A list
  of features is given in FEATURES, also with the source.


2) On what machines will it run?
d163 12
a174 6
  The installation mechanism has recently been altered to use GNU
  Autoconf, which should make it easier to recognise new machine
  types.  If you need to change something to support a new machine, it
  would be appreciated if you could add any necesssary preprocessor
  code and alter configure.in to configure zsh automatically, then
  send the required context diffs to the list (see question 22).
d177 5
a181 4
  reading directories are broken.  Make sure you compile without any
  reference to /usr/ucblib in (e.g.) your LD_LIBRARY_PATH.  The
  symptom of this is that globbed filenames will be missing the first
  two letters.
d192 1
a192 1
3) What's the latest version?
d200 1
a200 1
  Work has now started on 2.6 and 2.6-beta4 is available; note that
d206 5
a210 2
  changes, it may become incompatible with older versions; see the end
  of question 21 for a partial list.
d213 1
a213 1
4) Where do I get it?
d216 2
a217 11
  There are various mirrors:
  	ftp.math.gatech.edu:/pub/zsh
	ftp.sterling.com:/zsh
	ftp.cenatls.cena.dgac.fr:/pub/shells/zsh
	mrrl.lut.ac.uk:/zsh
  The latest full release is in zsh-2.5.03.tar.gz in these
  directories.  Note that this is in gzip format: you will need GNU
  gzip from your nearest GNU archive to unpack it.  The
  up-to-the-minute development version is in zsh-2.6-beta3.tar.gz.
  There is also a version under RCS control which may be more suitable
  for source hackers.
d219 13
a232 1
5) How does zsh differ from sh, ksh, csh, tcsh, bash?
d234 1
a234 2
  As has already been mentioned, zsh is most similar to ksh, while many
  of the additions are to please csh users.
d236 48
a283 1
  i) ksh:
d295 1
a295 1
  RM_STAR_SILENT, SH_WORD_SPLIT (see question 10) and SINGLE_LINE_ZLE.
d309 1
a309 1
  * Shell word splitting: see question 10).  (This is particularly
d317 1
d339 1
a339 1
      The last two (with `#') require EXTENDED_GLOB.
d348 1
a348 1
      (function definitions with () expand aliases -- see question 6).
d353 1
a353 1
    By default, background jobs are killed when you log out:  see 18).
d383 2
a384 1
  ii) csh:
d407 1
a407 19
    Arrays have csh-like features (see i)).

  iii) tcsh:

  (The previous section applies too, of course.)  Certain features have
  been borrowed from tcsh, including $watch, run-help, $savehist,
  $histlit, periodic commands etc., extended prompts, sched and
  which/where built-ins.  Programmable completion was inspired by, but
  is entirely different to, tcsh's `complete'. (There is a perl script
  called lete2ctl in the scripts directory of the source distribution to
  convert `complete' to `compctl' statements.)  This list is not
  definitive: some features have gone in the other direction.

  If you're missing the editor function run-fg-editor, try something
  with bindkey -s (which binds a string to a keystroke), e.g.
	bindkey -s '^z' '\eqfg %$EDITOR:t\n'
  which pushes the current line onto the stack and tries to bring a job
  with the basename of your editor into the foreground.  Bindkey -s
  allows limitless possibilities along these lines.
a408 10
  iv) bash:
  
  Zsh has almost all the features that bash has (and much more); in
  addition it is about twice as fast, though this is less impressive
  than it sounds.  With the new malloc by Sven Wischnowsky (only used if
  you arranged for USE_ZSH_MALLOC to be defined in config.h when
  compiling zsh), zsh uses about the same amount of heap memory as bash,
  which was previously the biggest gripe.  The only feature I am aware
  of that zsh doesn't have is setting a numerical value for ignoreeof
  --- it's always 10 --- but of course I don't use bash :-).
d410 1
a410 7
  However, zsh has no claims towards Posix compliancy and will not use
  GNU readline (zle is more powerful).  In fact, bash is intended more
  as an enhanced sh than a ksh work-alike; it doesn't handle [[ ... ]],
  for example.


6) Why do my csh aliases not work?  (Plus other alias pitfalls.)
d501 63
a563 1
7) How do I turn off spelling correction for an individual command?
d575 1
a575 1
8) How do I get the meta key to work on my xterm?
d590 1
a590 1
9) Why does my terminal act funny in way x?
d622 5
a626 5
  After the release of version 2.5, there is likely to be an overhaul
  which allows the terminal modes used by the shell to be modified
  separately from those seen by external programmes.  This is partially
  implemented already:  in 2.5, the shell will be less susceptible to
  mode changes inherited from programmes.
d629 1
a629 1
10) Why does `$var' where var="foo bar" not do what I expect?
d649 4
a652 3
  effects for variables with entirely innocuous embedded spaces.  The
  natural way to produce word-splitting behaviour in zsh is via arrays.
  For example,
d661 10
d679 1
a679 1
11) Why do my autoloaded functions not autoload [the first time]?
d698 6
a703 5
  The shell may soon be enhanced to allow the Korn shell syntax, where
  the file contains the whole function including the definition lines.
  However, the form given above is unlikely to disappear as it allows
  significant benefits, including using a function directly as a script,
  and being able to link a function under different names.
d706 1
a706 1
12) How does base arithmetic work?
d734 1
a734 1
13) How do I get a newline in my prompt?
d748 1
a748 1
14) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
d756 1
a756 1
15) Why can't I bind \C-s and \C-q any more?
d770 1
a770 1
16) How do I execute command `foo' within function `foo'?
d779 1
a779 1
17) Why do history substitutions with single bangs do something funny?
d788 1
a788 1
18) Why does zsh kill off all my background jobs when I logout?
d804 1
a804 39
19) 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).  

  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.  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.

  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.

d806 200
a1005 32
20) Shouldn't zsh be more/less like ksh/(t)csh?

  People often ask why zsh has all these `unnecessary' csh-like features,
  or alternatively why zsh doesn't understand more csh syntax.  This is
  far from a definitive answer and the debate will no doubt continue.

  Paul's object in writing zsh was to produce a ksh-like shell which
  would have features familiar to csh users.  For a long time, csh was
  the preferred interactive shell and there is a strong resistance to
  changing to something unfamiliar, hence the additional syntax and
  CSH_JUNKIE options.  This argument still holds.  On the other hand,
  the arguments for having what is close to a plug-in replacement for ksh
  are, if anything, even more powerful:  the deficiencies of csh as a
  programming language are well known (look in any Usenet FAQ archive, e.g.
    rtfm.mit.edu:pub/usenet-by-group/news.answers/unix-faq/shell/csh-whynot
  if you are in any doubt) and zsh is able to run many standard scripts
  such as /etc/rc.
  
  Of course, this makes zsh rather large and quite messy so that it
  seems to appeal mainly to hackers.  The only answer, perhaps not
  entirely satisfactory, is that you have to ignore the bits you don't
  want.


21) What bugs are currently known and unfixed?

  Here are some of the more well-known ones, very roughly in decreasing
  order of significance.  Many of these can also be counted against
  differences from ksh in question 5); note that this applies to the
  latest beta version and that simple bugs are often fixed quite
  quickly.  There is a file BUGS in the source distribution with more
  detail.
d1032 2
a1033 1
    `if [[ ... ]] command'; this was mainly here for csh compatibility.
d1057 1
a1057 1
22) Where do I report bugs, get more info / who's working on zsh?
d1085 1
a1085 1
  (or `rick' at the same adress).
d1095 1
a1095 1
23) What's on the wish-list?
d1097 1
a1097 2
  Ksh/sh compatibility could be improved if required.  This would
    be a useful long term goal.
a1098 1
  Option to quote !-history lexically via '' but not "".
d1119 15
@


1.33
log
@mods for jan posting
@
text
@d2 1
a2 1
Last-Modified: 1995/1/30
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.32 1994/12/14 12:44:35 pws Exp pws $
d159 1
a159 1
  Work has now started on 2.6 and 2.6-beta3 is available; note that
a183 3
  (Job control is partially broken in beta3, but beta4 should not be
  far away; for the time being delete `!list_pipe ||' from the end of
  line 662 in source file exec.c.)
a184 1

d563 6
@


1.32
log
@post early for christmas
@
text
@d2 1
a2 1
Last-Modified: 1994/12/14
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.31 1994/11/24 11:26:10 pws Exp pws $
d159 8
a166 8
  Work has now started on 2.6; note that even numbered minor versions
  are not released.  Development of zsh is usually 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.  Note also that as the shell changes, it may become
  incompatible with older versions; see the end of question 21 for a
  partial list.
d180 1
a180 1
  up-to-the-minute development version is in zsh-2.6-beta2.tar.gz.
d184 3
d188 1
d234 2
a235 2
    The $((...)) version of numeric evaluation is not implemented; use
      $[...] (this is probably about to change).
d555 3
a557 4
  matching '}' at the end.  If you include those, then when zsh loads
  and run the function the first time you try to use it, the whole
  file is run --- in other words, zsh simply defines the function and
  does nothing else.
d563 4
a566 1
  `print -n "\033]2;$*\a"'.
d577 1
a577 1
  (note that `foo=$((16#ff))' is not yet supported, but will be soon).
@


1.31
log
@mods for posting
@
text
@d2 3
a4 3
Last-Modified: 1994/9/25
Submitted-By: pws@@s-a.amtp.liv.ac.uk (Peter Stephenson)
Version: $Id: zsh.FAQ,v 1.30 1994/10/25 11:26:39 pws Exp pws $
d142 7
d150 1
d153 5
a157 5
  Zsh 2.5.0 has just been released; the final form is 2.5.03.  Many
  bugs have been fixed since 2.3.1, which was the last major release,
  and there are many new features, notably programmable completion.
  This version is known to have a bug with pipelines inside other
  shell structures (now fixed in 2.6).
d201 6
a206 4
  NO_HUP, NO_RCS, NO_SHORT_LOOPS, PROMPT_SUBST, RM_STAR_SILENT,
  SH_WORD_SPLIT (see question 10) 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 and set suitable options.
d213 1
d217 1
a217 1
      frequently asked about.)
d225 2
d229 3
a231 2
      (The GLOB_SUBST option has just been added to fix this.)
    The $((...)) version of numeric evaluation is not implemented; use $[...].
d233 1
a233 2
    $PSn do not do parameter substitution by default (use PROMPT_SUBST 
      option).
d245 1
a245 1
      The last two (with `#') require the EXTENDED_GLOB option.
d250 2
a251 2
  * There is no ENV variable (use /etc/zshrc, ~/.zshrc; note also ZDOTDIR).
    The PATH is not searched for commands specified at invocation without -c.
d284 2
d303 1
a303 1
    The nonomatch option.
d571 1
a571 1
  (note that `foo=$((16#ff))' is not yet supported).
@


1.30
log
@mods for posting
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.29 1994/09/25 13:40:52 pws Exp pws $
d32 1
a32 1
problems, go to 23).
d76 1
a76 1
2) On what machines will it run?
d91 7
a97 8
17) Why can't I get zsh to work with SGI's `userenv'?
18) Why do history substitutions with single bangs do something funny?
19) Why does zsh kill off all my background jobs when I logout?
20) I don't have root access: how do I make zsh my login shell?
21) Shouldn't zsh be more/less like ksh/(t)csh?
22) What bugs are currently known and unfixed?
23) Where do I report bugs, get more info / who's working on zsh?
24) What's on the wish-list?
d112 1
a112 1
  the mailing list (see question 23).  It is freely available to
d123 18
a140 14
  machines (and all the most popular) will run it without major surgery.
  Modifications have been made so that it should work under SYSVR4-based
  operating systems such as Solaris 2.x and OSF/1.  This best thing is
  to suck it and see.  You may not have to change too much: if you do
  change anything, arrange for the shell script `buildzsh' to set the
  necessary #define's, etc., without human intervention.  Recent
  additions include Convex, Unicos and Linux support; there is a project
  to allow POSIX.1 compilation (but note that that zsh is not itself
  particularly POSIX-compliant at the moment).  Success has been
  obtained on older SYSVR3 systems, but you may need to modify the code.
  
  If you add support for a new machine, it would be appreciated if you
  could alter buildzsh to configure zsh automatically and send the
  required context diffs to the list (see question 23).
d172 1
a172 1
  up-to-the-minute development version is in zsh-2.6-alpha4.tar.gz.
d246 1
a246 1
    By default, background jobs are killed when you log out:  see 19).
d621 1
a621 11
f17) Why can't I get zsh to work with SGI's `userenv'?

  It seems the Silicon Graphics `userenv' command interacts weirdly with
  the line editor (zsh is not unique in this respect).  Add this line to
  the top of your .zshenv file:
        if [[ "${ENVONLY:-0}" -eq 1 ]]; then unsetopt zle; fi
  --- which will turn the line editor off if it sees a `userenv' coming.
  Don't turn zle back on with setopt until [[ $ENVONLY -ne 1 ]].


18) Why do history substitutions with single bangs do something funny?
d630 1
a630 1
19) Why does zsh kill off all my background jobs when I logout?
d646 1
a646 1
20) I don't have root access: how do I make zsh my login shell?
d686 1
a686 1
21) Shouldn't zsh be more/less like ksh/(t)csh?
d710 1
a710 1
22) What bugs are currently known and unfixed?
d768 1
a768 1
23) Where do I report bugs, get more info / who's working on zsh?
d806 1
a806 1
24) What's on the wish-list?
@


1.29
log
@mods for postings
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.28 1994/08/17 16:19:08 pws Exp pws $
d32 1
a32 1
problems, go to 22).
d111 4
a114 4
  It was written by Paul Falstad <pf@@z-code.com> when a student at
  Princeton; however, Paul doesn't maintain it any more and enquiries
  should be sent to the mailing list (see question 22).  It is freely
  available to anyone under unrestrictive conditions.
d137 1
a137 1
  required context diffs to the list (see question 22).
d146 1
a146 1
  shell structures.
d165 1
d169 1
a169 1
  up-to-the-minute development version is in zsh-2.6-alpha3.tar.gz.
d227 1
a227 1
           +(foo)         foo(foo)#      One or more occurrences of foo.
d243 1
a243 1
    By default, background jobs are killed when you log out:  see 18).
d263 1
a263 3
    There is no built-in command newgrp: use a shell function, e.g.
      newgrp () { ((SHLVL--)) ; exec command newgrp $* }
      (in 2.4 you can get away with `alias newgrp="exec newgrp"'
d521 1
a521 1
  word splitting), also the substitution ${=foo} to toggle word
d618 1
a618 1
17) Why can't I get zsh to work with SGI's `userenv'?
d726 7
a732 6
  Certain built-ins won't allow the `VAR=value command ...' assignment;
    the ones that do don't unset VAR after use (may not really be a bug).
    (N.B.: `exec foo=bar command' is a workaround for exec.)
  The `histlit' option adds newlines to lines in the history
    (and is broken in several other ways, e.g. !:x word selection;
    it may be removed).
d735 1
a735 1
  `set -x' (`setopt xtrace') doesn't show as much as it should.
a773 7
  Recently fixed bugs include:
  The line number of errors inside control structures was always given
    as the end of the structure (i.e. at `fi', `done', etc.).
  `wait' on its own was not interruptible;  interrupting `wait %...'
    killed the job; wait did not set the correct status.
  $_ returns the last unexpanded word from the previous line (not command).

d834 1
a834 1
Richar Colemnat for their hard work as archivists, and to Peter Gray
@


1.28
log
@mods for posting
@
text
@d2 1
a2 1
Last-Modified: 1994/8/17
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.27 1994/07/18 16:28:20 pws Exp pws $
a6 2
*** Zsh version 2.5 now released!  See question 3. ***

d13 4
a16 3
Information on zsh is now available via the World Wide Web at
http://noaacdc.colorado.edu/~mdb/zsh/zsh_home.shtml including this FAQ and
much else (thanks to Mark Borges for this).
d85 1
a85 1
11) My PATH, (MANPATH, ...) sometimes doesn't handle tildes.  What gives?
d142 14
a155 11
  Zsh 2.5.0 has just been released.  Many bugs have been fixed since
  2.3.1, which was the last major release, and there are many new
  features, notably programmable completion.

  Work will probably now start on 2.6; note that even numbered minor
  versions are not released.  Development of zsh is usually patch by
  patch.  Note that this `open' development system does mean bugs are
  sometimes introduced into the most recent archived version.  These are
  usually fixed quickly.  Note also that as the shell changes, it may
  become incompatible with older versions; see the end of question 21
  for a partial list.
d165 6
a170 6
  The latest full release is in zsh-2.5.03.tar.gz in these directories.
  Note that this is in gzip format: you will need GNU gzip from your
  nearest GNU archive to unpack it.  There is also a version under RCS
  control which may be more suitable for source hackers.  (This is
  currently out of date but when work on zsh-2.6 or zsh-3.0 starts it
  will reappear.)
d528 1
a528 1
11) My PATH, (MANPATH, ...) sometimes doesn't handle tildes.  What gives?
d530 14
a543 9
  The code has recently been overhauled, so take a look at the latest
  version of 2.4beta.  This guarantees that no ~user expansion (or
  =command expansion, which takes place at the same time) will happen if
  the tilde is quoted, and also rationalises PATH-type variables by
  expanding all unquoted assignments as if they are colon-separated
  lists (so you may need to add or subtract a few extra quotes, but the
  results are more predictable).  In addition typeset, etc., now should
  behave like ordinary assignments in this respect; previously tildes in
  typeset assignments were unquotable.
@


1.27
log
@mods for posting (NB 2.5.0 released)
@
text
@d2 1
a2 1
Last-Modified: 1994/7/18
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.26 1994/06/27 13:42:21 pws Exp pws $
d16 1
a16 1
http://noaacdc.colorado.edu/~mdb/zsh/zsh_home.html including this FAQ and
d158 6
a163 4
  Bas de Bakker (bas@@phys.uva.nl) is in charge of the archive and the
  latest version is available for users east of the Atlantic from:
	carlo.phys.uva.nl(145.18.218.21):/pub/bas/zsh/zsh-2.4beta.tar.gz
  The latest full release is in zsh-2.3.1.tar.gz in the same directory.
d166 3
a168 1
  control which may be more suitable for source hackers.
a169 2
  Rick Ohnemus has a reflector site in the USA:
        ftp.sterling.com (192.124.9.3):/zsh
a170 4
  The 2.3.1 distribution is also available from ftp.uu.net and mirrors
  in the directory pub/shells/zsh.


a719 1
  Pipelines ending in a while/until/for loop are uninterruptible.
a814 1
  (The following will not be done before the release of 2.5.)
a827 2
  The introduction to zsh (intro.*) could do with an update to reflect
    extended completion (in particular) and other recent additions.
d833 6
a838 5
regarding this document; thanks to Jim Mattson and more recently Bas de
Bakker for their hard work as archivists, and to Peter Gray for
maintaining the mailing list, without which zsh might easily have died,
and to the latest list maintainer, Rick Ohnemus.  The world is eternally
in the debt of Paul Falstad for inventing zsh in the first place.
@


1.26
log
@mods for posting
@
text
@d2 1
a2 1
Last-Modified: 1994/6/27
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.24 1994/04/25 16:50:31 pws Exp pws $
d7 2
d143 11
a153 20
  The latest production version is 2.3.1; at this time zsh was not
  ported to as many systems, so (for example) for Solaris 2 you are more
  or less constrained to use the beta version.

  The current beta version is 2.4.  New patches occur frequently and are
  added to the archive (next question).  At the time of writing the
  latest patch level was 333.  Note that this `open' development system
  does mean bugs are sometimes introduced into the most recent archived
  version.  These are usually fixed quickly.  Note also that as the
  shell changes, it may become incompatible with older versions; see the
  end of question 21 for a partial list.

  The next production version will be 2.5 (2.4 will not be released, so
  as to minimise confusion over version numbers).  It is expected that
  no new features will be added before the release.

  ** STOP PRESS ** Release of 2.5 is imminent.  The archive now contains
  a preliminary version 2.5.0a; apart from a few fixes, such as a known
  bug when completing using complicated compctl expressions and
  configuration changes for some machines, this will form the release.
a731 3
  The line number of errors inside control structures is always given
    as the end of the structure (i.e. at `fi', `done', etc.).
  $_ returns the last unexpanded word from the previous line (not command).
a735 2
  `wait' on its own is not interruptible;  interrupting `wait %...'
    kills the job; wait does not set the correct status.
d737 1
d742 2
a743 2
    <condition> ) <code>' and for similar for and while (but not
    foreach) commands.  This is because it is valid Bourne/Korn shell
d746 3
d769 7
@


1.25
log
@mods for postings
@
text
@d2 1
a2 1
Last-Modified: 1994/525
d88 10
a97 9
15) How do I execute command `foo' within function `foo'?
16) Why can't I get zsh to work with SGI's `userenv'?
17) Why do history substitutions with single bangs do something funny?
18) Why does zsh kill off all my background jobs when I logout?
19) I don't have root access: how do I make zsh my login shell?
20) Shouldn't zsh be more/less like ksh/(t)csh?
21) What bugs are currently known and unfixed?
22) Where do I report bugs, get more info / who's working on zsh?
23) What's on the wish-list?
d147 1
a147 1
  latest patch level was 321.  Note that this `open' development system
d157 4
d162 1
d193 7
a199 7
  compatibility, though decrease zsh's abilities: see the manual entries
  for IGNORE_BRACES (though brace expansion occurs in some versions of
  ksh), KSH_OPTION_PRINT, NO_BANG_HIST, NO_EQUALS, NO_HUP, NO_RCS,
  NO_SHORT_LOOPS, PROMPT_SUBST, RM_STAR_SILENT, SH_WORD_SPLIT (see
  question 10) 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 and set suitable options.
d215 1
d217 1
a217 1
    The results of parameter substitutions are treated as plain text:
d219 1
d221 3
a223 2
    Treatment of backslashes within backquotes is different.
    $PSn do not do parameter substitution by default (use promptsubst option).
d598 15
a612 1
15) How do I execute command `foo' within function `foo'?
d621 1
a621 1
16) Why can't I get zsh to work with SGI's `userenv'?
d631 1
a631 1
17) Why do history substitutions with single bangs do something funny?
d640 1
a640 1
18) Why does zsh kill off all my background jobs when I logout?
d656 1
a656 1
19) I don't have root access: how do I make zsh my login shell?
d696 1
a696 1
20) Shouldn't zsh be more/less like ksh/(t)csh?
d720 1
a720 1
21) What bugs are currently known and unfixed?
a744 1
  Linked directories can sometimes confuse zsh's idea of its cwd.
d746 3
a748 2
  `wait' is not interruptible.
  read -q in a script assumes `n'.
d768 4
d779 1
a779 1
22) Where do I report bugs, get more info / who's working on zsh?
d817 1
a817 1
23) What's on the wish-list?
@


1.24
log
@mods for postings
@
text
@d2 1
a2 1
Last-Modified: 1994/1/25
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.23 1994/03/23 18:18:21 pws Exp pws $
d14 1
a14 1
http://crdmac11.colorado.edu:/zsh/zsh_home.html including this FAQ and
d146 1
a146 1
  latest patch level was 315.  Note that this `open' development system
d168 1
a168 1
        ftp.sterling.com (192.124.9.1):/zsh
a724 2
  The =(..) substitution has a race condition which can hang the shell.
  trap '' INT does not work with interactive commands.
@


1.23
log
@Mods for usenet/zsh-announce posting
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.22 1994/02/28 17:19:21 pws Exp pws $
a64 1

d68 5
d140 11
a150 6
  The latest production version is 2.3.1.  The current beta version is
  2.4.  New patches occur frequently and are added to the archive (next
  question).  At the time of writing the latest patch level was 309.
  Note that this `open' development system does mean bugs are sometimes
  introduced into the most recent archived version.  These are usually
  fixed quickly.
d199 1
a199 1
  ksh-like manner if the shell is invoked as ksh.
d231 1
a231 1
    There is no ENV variable (use /etc/zshrc, ~/.zshrc; note also ZDOTDIR).
d246 1
a246 1
    The options emacs, gmacs, privileged, trackall, viraw are not supported.
d286 3
a288 1
    foreach ... loops; alternate syntax for other loops.
d541 8
a548 3
  The syntax (e.g. using the `let' builtin is)
	let 'foo = [16]ff'
  (note this is different from ksh, which uses `16#ff'), or equivalently
d550 2
d683 1
a683 1
  csh_junkie options.  This argument still holds.  On the other hand,
d725 1
a725 1
  The =(..) substitution is not done synchronously.
a726 4
  exec with a pipeline execs the first command and exits (sh does nothing).
  $rprompt does not disappear when characters are entered fast.
  (../)# does not stop at the root directory.
  exec's in the tail of a list behave weirdly interactively.
a727 1
  Fd closure in a shell function stays around.
d729 18
a746 6
  Note that a few recent changes introduce incompatibilities (these are
  not bugs): the -h option to compctl has been removed (use `-k hosts'
  for the same effect); automatic handling of hosts after '@@' has been
  removed (use e.g. `compctl -u -x "n[-1,@@]" -k hosts -- finger');
  handling of backslashes in `echo' and `print' has changed; umask's
  behaviour with respect to symbolic operators has reversed.
d794 1
a809 2
  There should be a full HTML version of this document (the Ohio State
    archive has minimal conversion).
@


1.22
log
@mods for usenet/zsha posting
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.21 1994/01/25 11:10:29 pws Exp pws $
d13 4
d76 1
a76 1
7) How do I turn off spelling correction for an indvidual command?
d107 1
a107 1
  should be sent to the mailing list (see question 20).  It is freely
d131 1
a131 1
  required context diffs to the list (see question 20).
d138 1
a138 1
  question).  At the time of writing the latest patch level was 291.
d182 1
a182 1
  question 14) and SINGLE_LINE_ZLE.  Note that you can also disable any
d258 1
a258 1
  Other idiosyncracies:
d560 1
a560 1
  free to right this :-).
d657 1
a657 1
  People often ask why zsh has all these `unnecesary' csh-like features,
d668 2
a669 1
  programming language are well known (FTP convex.com:pub/csh.whynot
d685 2
a686 1
  quickly.
a704 1
  Still problems under SCO Unix (a patch existed was never merged).
d706 9
a714 1
  SIGHUP cannot be trapped.
d720 2
a721 1
  handling of backslashes in `echo' and `print' has changed.
d762 3
@


1.21
log
@mods for usenet/zsh-announce postings
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.20 1993/12/21 15:15:46 pws Exp pws $
d27 1
a27 1
problems, go to 21).
d189 1
a189 1
  * Shell word splitting: see question 9).  (This is particularly
d227 1
a227 1
    By default, background jobs are killed when you log out:  see 17).
d249 1
d677 3
a679 4
  order of significance.  A fuller bug list is now maintained by Carlos
  Carvalho <carlos@@snfep1.if.usp.br>.  Many of these can also be counted
  against differences from ksh in question 5); note that this applies to
  the latest beta version and that simple bugs are often fixed quite
d699 1
a699 1
  Still problems under SCO Unix (a patch exists but hasn't been merged yet).
d767 2
@


1.20
log
@mods for zsh-announce and usenet postings 21/21/93
@
text
@d2 1
a2 1
Last-Modified: 1993/12/21
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.19 1993/11/26 14:39:33 pws Exp pws $
d134 1
a134 1
  question).  At the time of writing the latest patch level was 283.
@


1.19
log
@mods for usenet posting
@
text
@d2 1
a2 1
Last-Modified: 1993/09/29
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.18 1993/11/15 15:20:40 pws Exp pws $
d197 2
@


1.18
log
@zsh=announce
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.17 1993/09/29 11:54:38 pws Exp pws $
d72 17
a88 16
7) How do I get the meta key to work on my xterm?
8) Why does my terminal act funny in way x?
9) Why does `$var' where var="foo bar" not do what I expect?
10) My PATH, (MANPATH, ...) sometimes doesn't handle tildes.  What gives?
11) How does base arithmetic work?
12) How do I get a newline in my prompt?
13) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
14) How do I execute command `foo' within function `foo'?
15) Why can't I get zsh to work with SGI's `userenv'?
16) Why do history substitutions with single bangs do something funny?
17) Why does zsh kill off all my background jobs when I logout?
18) I don't have root access: how do I make zsh my login shell?
19) Shouldn't zsh be more/less like ksh/(t)csh?
20) What bugs are currently known and unfixed?
21) Where do I report bugs, get more info / who's working on zsh?
22) What's on the wish-list?
d134 1
a134 1
  question).  At the time of writing the latest patch level was 264.
d148 1
a148 1
	carlo.phys.uva.nl(145.18.220.25):/pub/bas/zsh/zsh-2.4beta.tar.gz
d403 1
a403 1
7) How do I get the meta key to work on my xterm?
d405 12
d430 1
a430 1
8) Why does my terminal act funny in way x?
d469 1
a469 1
9) Why does `$var' where var="foo bar" not do what I expect?
d508 1
a508 1
10) My PATH, (MANPATH, ...) sometimes doesn't handle tildes.  What gives?
d521 1
a521 1
11) How does base arithmetic work?
d542 1
a542 1
12) How do I get a newline in my prompt?
d556 1
a556 1
13) Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
d564 1
a564 1
14) How do I execute command `foo' within function `foo'?
d573 1
a573 1
15) Why can't I get zsh to work with SGI's `userenv'?
d583 1
a583 1
16) Why do history substitutions with single bangs do something funny?
d592 1
a592 1
17) Why does zsh kill off all my background jobs when I logout?
d608 1
a608 1
18) I don't have root access: how do I make zsh my login shell?
d648 1
a648 1
19) Shouldn't zsh be more/less like ksh/(t)csh?
d671 1
a671 1
20) What bugs are currently known and unfixed?
d713 1
a713 1
21) Where do I report bugs, get more info / who's working on zsh?
d748 1
a748 1
22) What's on the wish-list?
d750 2
a756 1
  Ksh/sh compatibility could be improved if required.
@


1.17
log
@mods for usenet posting
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.16 1993/09/16 12:27:26 pws Exp pws $
a210 1
    The `[!a-z]' negated character class syntax doesn't exist; use `[^a-z]'
@


1.16
log
@mods for zsh-announce posting
@
text
@d2 1
a2 1
Last-Modified: 1993/09/16
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.15 1993/08/23 14:27:01 pws Exp pws $
d133 1
a133 1
  question).  At the time of writing the latest patch level was 249.
a687 7

  Former bugs recently fixed (in archive now or soon):
    Lines which spill over the right margin cannot be cut/pasted properly
      (not necessarily a bug, but highly annoying).
    `.' and `source' could not be interrupted.
    Null bytes introduced by `\000' in print statements confuse the shell.
    `cd ./foo' searched the cdpath for foo.
@


1.15
log
@mods for Usenet posting
@
text
@d2 1
a2 1
Last-Modified: 1993/08/23
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.14 1993/08/16 09:12:45 pws Exp pws $
d26 2
a27 2
skip to question 4; if you want to know what to do with insoluble
problems, go to 20.
d70 1
a70 1
5) How does zsh differ from sh, ksh, csh,...?
d84 4
a87 3
19) What bugs are currently known and unfixed?
20) Where do I report bugs, get more info / who's working on zsh?
21) What's on the wish-list?
d121 6
a126 1
  particularly POSIX-compliant at the moment).
d133 1
a133 1
  question).  At the time of writing the latest patch level was 180.
d160 1
a160 1
5) How does zsh differ from sh, ksh, csh,...?
d170 1
a170 1
  on SunOS 4, which is essentially the 11/16/88 version of ksh.
d188 1
a188 1
  * Shell word splitting: see question 14.  (This is particularly
d224 2
d245 2
a246 1
    There is no built-in command newgrp: use a shell function.
d279 8
a286 8
  Certain features have been borrowed from tcsh, including $watch,
  run-help, $savehist, $histlit, periodic commands etc., extended
  prompts, sched and which/where built-ins.  Programmable completion was
  inspired by, but is entirely different to, tcsh's `complete'. (There
  is a perl script called lete2ctl in the scripts directory of the
  source distribution to convert `complete' to `compctl' statements.)
  This list is not definitive: some features have gone in the other
  direction.
d298 12
a309 5
  addition it is about twice as fast (this is less impressive than it
  sounds).  However, zsh has no claims towards Posix compliancy and will
  not use GNU readline (zle is more powerful).  In fact, bash is
  intended more as an enhanced sh than a ksh work-alike; it doesn't
  handle [[ ... ]], for example.
d561 1
a561 1
15) I can't get zsh to work with SGI's `userenv'.
d610 2
a611 1
  In .profile, try something like
d613 1
a613 1
  and in .login, try something like
d624 1
a624 1
  a minimum safety check is `if ($?prompt) ...'.
d636 24
a659 1
19) What bugs are currently known and unfixed?
a684 1
  Null bytes introduced by `\000' in print statements confuse the shell.
d687 1
a687 2
  `cd ./foo' searches CDPATH for foo.
  SIGHUP apparently cannot be trapped.
d693 2
d702 7
a708 1
20) Where do I report bugs, get more info / who's working on zsh?
d743 1
a743 1
21) What's on the wish-list?
a744 2
  The shell is getting rather large and any simplifications would be
    appreciated.
@


1.14
log
@mods for zsh-announce.
@
text
@d2 1
a2 1
Last-Modified: 1993/07/23
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.13 1993/07/23 09:41:10 pws Exp pws $
d59 1
a59 1
  Spelling correction (which works).
a212 1
    Functions will call themselves recursively: see question 14.
d219 2
a220 1
      automatically when called.
d224 4
a227 1
      (Use bindkey to change the editing behaviour.)
a235 3
    No built-in commands cause automatic termination of a script on
     failure (e.g., `. file' in a script doesn't cause it to bail out
     if `file' doesn't exist).
d418 5
d434 6
d477 1
d479 1
d523 3
d633 2
a634 1
    (and is broken in several other ways, e.g. !:x word selection).
a639 1
  Memory leak in saving history with append (fc -AI).
d645 1
d647 3
d654 1
d656 5
@


1.13
log
@Mods for USENET posting 1993/07/23
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.12 1993/07/11 18:07:40 pws Exp pws $
d127 4
a130 1
  question).  At the time of writing the latest patch level was 173.
d288 6
a293 5
  Zsh has all the features that bash has (and much more); in addition it
  is about twice as fast.  However, zsh has no claims towards Posix
  compliancy and will not use GNU readline (zle is more powerful).
  In fact, bash is intended more as an enhanced sh than a ksh work-alike;
  it doesn't handle [[ ... ]], for example.
d620 1
a620 1
  `set -x' doesn't show as much as it should.
a628 1
  Terminal I/O processing is currently doing weird things (fix soon).
d681 6
@


1.12
log
@Mods for zsh-announce posting, 1993/07/11
@
text
@d2 1
a2 1
Last-Modified: 1993/07/11
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.11 1993/06/22 13:46:18 pws Exp pws $
d288 1
a288 1
  Philosophically, bash is more of an enhanced sh than a ksh-lookalike;
d480 1
a480 1
  or equivalently
d522 1
a522 1
  using `command'.  (In ksh, functions were never called recursively.)
a607 2
  Lines which spill over the right margin cannot be cut/pasted properly
    (not necessarily a bug, but highly annoying).
d629 2
d673 1
a673 1
  Option to quote !-history lexically via '' but not ""..
@


1.11
log
@mods for USENET posting 1993/06/22
@
text
@d2 1
a2 1
Last-Modified: 1993/06/22
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.10 1993/06/09 12:50:26 pws Exp pws $
d127 1
a127 1
  question).  At the time of writing the latest patch level was 164.
d138 1
a138 1
	carlo.phys.uva.nl (145.18.220.25):/pub/bas/zsh/zsh-2.4beta.tar.gz
d140 3
a142 4
  Note that this is in gzip format: you will need GNU gzip (of which there
  is now a production version) from your nearest GNU archive to unpack it.
  There is also a version under RCS control which may be more suitable
  for source hackers.
d157 1
d169 2
a170 1
  built-in commands which get in your way.
d172 6
a177 3
  Differences from ksh which might prove significant for ksh
  programmers, some of which may be interpreted as bugs (there must be
  more) include:
d179 1
a179 1
    Shell word splitting: see question 14.  (This is particularly
d189 14
a202 2
    PS1 does not do parameter substitution by default (promptsubst option).
    Globbing does not allow ksh-style `pattern-lists'.
d204 2
d207 1
a208 1
    There is no ENV variable (use /etc/zshrc, ~/.zshrc; note also ZDOTDIR).
d216 3
a218 2
    Traps are not local to functions and are not reset automatically
      when called.
d223 1
d227 2
a228 1
    Not all ksh bindings are set (e.g. `<ESC>#').
d231 3
a233 6
     failure (e.g., a missing file with `. file' doesn't cause a script
     to bail out).
    Some built-ins (true, false, r, ...) were aliases in ksh.
    [ ] is a shell built-in, rather than a call to /bin/test.
      (but you can disable the built-in).  It is also a bit
      over-enthusiastic about recognising -o's and -a's.
d236 1
d280 10
a289 2
  with the basename of your editor into the foreground.  With a bit
  of playing around you can implement run-fg-anything.
d379 2
a380 2
  possible to argue for extra warnings somewhere in this mess.  If you
  define `function' as an alias you deserve what you get.
d608 2
a609 3
  (?? Weird command hashing problems e.g. with command completion,
    only experienced by some users ??)
  Lines which spill over the right margin cannot be cut/pasted properly.
d618 4
d627 1
a627 1
  Input processing of e.g. ^V is doing something weird in Solaris 2.
a630 5
    `return' in a shell script should have acted as `exit'.
    "$@@" always indicated at least one argument.
    ${1+foo} always returned `foo' even if $1 was not set.
    Attempts to trap untrappable signals produced an incorrect message.
    Autoloaded functions with malformed [[...]] constructs dumped core.
d637 1
a637 1
	zsh-list@@imd.sterling.com so any suggestions, complaints,
d643 1
a643 1
	zsh-announce@@imd.sterling.com
d652 1
a652 1
	Majordomo@@imd.sterling.com
d660 1
a660 1
	owner-zsh-list@@imd.sterling.com
@


1.10
log
@Mods for posting 1993/06/09
@
text
@d2 1
a2 1
Last-Modified: 1993/05/23
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.9 1993/05/23 19:03:59 pws Exp pws $
d45 1
a45 1
    variable, host, editing function and option name completion,
d81 1
a81 1
16) Why do history subsitutions with single bangs do something funny?
d127 1
a127 1
  question).  At the time of writing the latest patch level was 90.
d129 3
d133 1
d138 2
a139 2
	carlo.phys.uva.nl (145.18.220.25):/pub/bas/zsh/zsh-2.4.tar.z
  The latest full release is in zsh-2.3.1.tar.z in the same directory.
d148 3
d187 1
a187 1
    Unquoted assigments do file expansion after ':'s (intended for PATHs).
d209 3
a211 1
    No built-in commands cause automatic termination of a script.
a221 2
  The following is particularly near the feature/bug borderline:
    "$@@" always indicates at least one argument (older sh's do this too).
d257 7
d508 1
a508 1
16) Why do history subsitutions with single bangs do something funny?
d511 1
a511 1
  substitution then sets a default to which later history substutions
d524 1
a524 1
  logout.
d568 1
a568 1
  /etc/shells on all approriate machines, including NIS clients, or you
a582 1
  `return' in a shell script should act as `exit' (just fixed).
a584 2
  Autoloaded functions with malformed [[...]] constructs dump core.
  Window-resizing is not always handled properly (system-dependent).
d587 1
d600 6
d607 1
d610 17
a626 6
  Zsh is now maintained by a motley collection of enthusiasts who
  subscribe to the mailing list, so any suggestions, complaints,
  questions and matters for discussion should be addressed to:
	zsh-list@@imd.sterling.com
  (if you want someone to mail you directly, say so).  If you wish to
  subscribe to the mailing list, send an email message to
d628 1
a628 1
  (this is an automated server) containing
d633 1
a633 1
  works. (Don't send this to the list!). The list manager, Rick Ohnemus,
d648 1
a648 2
  Selective expansion of history, variables, globs on <TAB>.
  Option to quote !-history lexically via '' but not "" (hard).
d652 3
a654 1
  Ksh compatibility could be improved if required.
@


1.9
log
@Mods for Usenet post 93/5/23
@
text
@d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.8 1993/05/06 12:15:09 pws Exp pws $
d8 4
a11 3
significant) questions concerning the Z-shell, a powerful command
interpreter for many UNIX systems which is freely available to anyone
with FTP access.
d79 1
a79 1
14) How do I reference command `foo' from within function `foo'?
d99 1
a99 1
  It was written by Paul Falstad <pf@@ttisms.com> when a student at
d147 2
a148 2
  As mentioned, zsh is most similar to ksh, while many of the additions are
  to please csh users.
d156 8
d178 1
a178 1
    PS1 does not do parameter substitution by default.
d197 2
a198 1
    Management of histories in multiple shells is different.
d205 2
a206 1
      (but you can disable the built-in).
d218 1
a218 1
  Although certain features aim to ease the withdrawal symptoms of Csh
d222 2
a223 1
  and .login files; see also the next question concerning aliases.
d232 1
a232 1
    foreach ... loops.
d236 1
a236 1
    !-type history (which may be turned off).
a275 14
  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.  If you
  define `function' as an alias you deserve what you get.

  Finally, note that to define an alias beginning with a - (as with many
  other shell commands), you need to add a single `-' after `alias' to
  prevent the shell interpreting the alias as a flag.

d331 9
d341 1
d475 1
a475 1
14) How do I reference command `foo' from within function `foo'?
d478 1
a478 1
  aliases, but you do with functions.  Note that the error message
d480 1
a480 1
  is a good sign that you tried calling `foo' in function `foo' without
d569 1
a569 1
  `return' in a shell script should act as `exit'.
a571 5
  `eval' causes a memory leak.
  Compctl options -f and -c interact badly with the others (notably -g),
    particularly when the text to complete has a '/'.  (Sven Wischnowsky
    <oberon@@cs.tu-berlin.de> has overhauled the completion code, but this
    has yet to be merged with the general release.)
d574 2
a575 3
  Certain built-ins won't allow the `VAR=value command ...' assignment.
  The ones that do don't unset VAR after use.
  `bindkey -a -[ed]' modifies the alternate keymap.
d578 3
d582 2
a583 5
  In vi mode, `u' can go past the original modification point,
    and vi-set-mark and/or vi-goto-mark do not work.
  $_ returns the last unexpanded word from the previous line (not command).
  `time' is ignored with builtins and can't be used with {...} or (...).
  Autocd won't use globbed filenames and sometimes refuses to work.
a584 2
  `cd' is inconsistent with reporting new paths.
  Problems with search in vi mode.
d586 1
a586 1
  Still problems under SCO Unix -- patches from SCO users appreciated.
@


1.8
log
@Modified for monthly posting 1993/05/06
@
text
@d2 1
a2 1
Last-Modified: 1993/05/06
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.7 1993/04/23 20:41:55 pws Exp pws $
d50 1
d57 1
a57 1
  Manipulation of arrays.
d178 3
a180 2
      (function definitions expand aliases).
    Aliases and functions cannot be exported; there are no tracked aliases.
d188 1
a188 1
    Management of histories in multiple shells may be different.
d233 3
a235 2
  is a perl script to conver `complete' to `compctl' statements.)  This
  list is not definitive: some features have gone in the other
d274 4
d537 2
a538 1
  same time as you exec zsh.
d559 2
a560 4
  Background jobs are killed by SIGINT and SIGQUIT in shells without
    job control (despite what the manual page says).
  Weird command hashing problems e.g. with command completion,
    only experienced by some users.
d566 3
a568 2
    particularly when the text to complete has a '/'.  The new completion
    code may well have other teething problems.
d570 1
d574 2
a575 1
  The `histlit' option adds newlines to lines in the history.
d577 2
a578 1
  In vi mode, `u' can go past the original modification point.
d583 1
a583 1
  The `histlit' option doesn't allow word selection with !:1.
d586 1
a586 1
  Still problems under SCO Unix.
d608 1
a608 1
  The list (since the start of April 1993) is archived in
d620 3
a622 1
  Binding of shell functions (or commands?) to zle functions.
a623 1
  Bindkey could do with an overhaul (e.g. for arbitrary prefix keystrokes).
@


1.7
log
@revised for USENET post 23/4/93
@
text
@d2 1
a2 1
Last-Modified: 1993/04/02
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.6 1993/04/02 11:51:25 pws Exp pws $
d26 1
a26 2
problems, go to 20.  (N.B.: the mailing list address has changed since
the last posting.)
d36 1
a36 1
    (NEWNEWNEW) programmable completion: incorporates the ability to use
d85 1
d112 3
a114 3
  operating systems such as Solaris 2.x.  This best thing is to suck it
  and see.  You may not have to change too much:  if you do change
  anything,  arrange for the shell script `buildzsh' to set the
a119 2
  It would be useful to have a port for SCO Unix SVR4; as far as I know,
  this does not yet work properly.
a120 1

d125 1
a125 1
  question).  At the time of writing the latest patch level was 77.
d157 1
a163 3
    Path not searched for commands specified at invocation without -c.
    Functions will call themselves recursively: see question 14.
    Management of histories in multiple shells may be different.
d165 4
a168 1
    PS1 does not do parameter substitution  (an option may be forthcoming).
d170 13
d186 6
a193 1
    The $((...)) version of numeric evaluation is not implemented; use $[...].
a194 6
    The order in which aliases and functions are defined is significant.
    Some built-ins (true, false, r, ...) were aliases in ksh.
    Aliases and functions cannot be exported; there are no tracked aliases.
    The use of aliases for key bindings is replaced by `bindkey'.
    There is no ENV variable (but note ZDOTDIR).
    No built-in commands cause automatic termination of a script.
a195 4
    Traps are not local to functions and are not reset automatically
      when called.
    Treatment of backslashes within backquotes is different.
    (Recent addition) Unquoted assigments do file expansion after ':'s.
d198 2
a199 3
    Editing:
      \ does not escape editing chars (use ^V).
      Not all ksh bindings are set (e.g. `<ESC>#').
d229 5
a233 5
  prompts, sched and which/where built-ins.  This list is not
  definitive: some features have gone in the other direction.  There
  should eventually be a perl script to convert from tcsh to zsh
  programmable completion syntax; mail me if you want a preliminary
  version.
d335 3
d360 2
a361 2
  setting is wrong (e.g. ignpar should be -ignpar: see the stty(1)
  manual page), try:
d363 5
a367 3
	STTY='-ignpar' commandname
  (in this not-very-useful example).  Note that zsh doesn't reset the
  terminal completely afterwards: just the modes it uses itself.
d374 4
a377 3
  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.  An option (shwordsplit) exists to provide compatibility.
d386 1
a386 1
  the same function produces the output `2', like sh and ksh.
d400 1
a400 1
  
d414 4
a417 4
  lists (so you may need a few extra quotes, but the results are more
  predictable).  In addition typeset, etc., now should behave like
  ordinary assignments in this respect; previously tildes in typeset
  assignments were unquotable.
d466 1
a466 1
  using `command'.
d548 1
a548 1
  the latest beta version and that simple bugs are usually fixed quite
d551 4
a554 1
  Weird command hashing problems e.g. with command completion.
d559 3
a564 1
  Intermittent pgrp race condition with `{ echo anything } | more'.
d574 3
d584 1
a584 1
	zsh-list@@imd.sterling.com        **NOTE CHANGE**
d605 2
@


1.6
log
@Changes for zsh-list post 1993/04/2
New mailing list address
@
text
@d2 1
a2 1
Last-Modified: 1993/04/22
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.5 1993/03/19 13:14:32 pws Exp pws $
d77 1
a77 1
13) Why does `bindkey ^a command-name' do something funny?
d128 1
a128 1
  question).  At the time of writing the latest patch level was 55.
d167 1
d182 1
d441 1
a441 1
13) Why does `bindkey ^a command-name' do something funny?
d540 1
d548 1
a548 1
  Strange intermittent pgrp behaviour with `{ echo anything } | more'.
a552 4
  Various combinations of completion commands do not work properly, e.g:
  - if a command has both file and command completion enabled,
    completion of a word that is a directory finds only commands in
    the directory, not files and commands.
d554 1
@


1.5
log
@Modified for USENET posting 1993/03/19
@
text
@d2 1
a2 1
Last-Modified: 1993/03/16
d4 1
a4 1
Version: $Id: zsh.FAQ,v 1.4 1993/02/22 11:27:16 pws Exp pws $
d26 2
a27 1
problems, go to 20.
d33 3
a35 1
globbing zsh is well ahead of the competition.
d37 3
a39 1
    multi-line commands editable as a single buffer (even files!)
d48 1
a48 1
    recursive globbing (c.f find),
a58 3
Also coming Real Soon Now:  programmable completion (cf. tcsh 6.03).
(This exists; it was implemented by Sven Wischnowsky for zsh2.2 but
hasn't yet been merged with the official release.)
d60 1
d70 1
a70 1
6) Why do my csh aliases not work?
d99 1
a99 1
  should be sent to the mailing list (see question 17).  It is freely
d103 2
a104 4
  included with the source distribution are highly recommended.  The
  files intro.ps.Z and intro.txt.Z can also be FTP'd separately from the
  archive (see 4).  A list of features is given in FEATURES, also with
  the source.
d120 3
d128 1
a128 1
  question).
d134 1
a134 1
  latest version is available from:
d141 2
a142 2
  
  Richard Ohnemus has a reflector site for North American users:
d152 4
a155 4
  Most features of ksh are implemented in zsh; problems can arise
  because the implementation is slightly different.  Note also not all
  ksh's are the same either.  I have based this on SunOS 4, which is
  essentially the 11/16/88 version of ksh.
d160 2
a161 1
    Shell word splitting: see question 14.
d169 1
a169 1
    PS1 does not do parameter substitution.
d172 1
d176 1
d180 2
a181 3
    Aliases and functions cannot be exported.
    There are no tracked aliases.
    There is no ENV variable.
d223 4
a226 1
  definitive: some features have gone in the other direction.
d229 1
a229 1
6) Why do my csh aliases not work?
a250 1

d254 10
d397 3
a399 3
  version of 2.4beta.  This guarantees that no ~ expansion (or =
  expansion, which takes place at the same time) will happen if the
  tilde is quoted, and also rationalises PATH-type variables by
d514 4
a517 3
  cause csh scripts (yes, some people write these) to fail.  If you want
  to tell xterm to run zsh, change the SHELL environment variable to the
  full path of zsh.
d535 2
a536 1
  the latest beta version.
d545 1
a545 2
  Strange pgrp behaviour with `{ echo anything } | more' (fix soon?).
  Problems with `tty error' in zle with interrupt handling (just fixed).
d549 2
a550 3
  Command line editing in vi mode:
    `u' can go past original modification point.
  Various combinations of completion commands do not work properly:
a553 1
  - variable completion can affect directory completion.
d556 1
a556 1
  The rmstar feature doesn't handle shell variables properly.
d565 1
a565 1
	zsh-list@@cs.uow.edu.au
d567 15
a581 7
  subscribe to the mailing list, ask
	zsh-request@@cs.uow.edu.au
  which is in the hands of Peter Gray, who also reads the list.  It is
  by no means restricted to source-code hackers.

  N.B.: The list maintainer is about to change as Peter is going to be
  too busy.
a585 1
  `compctl' to be enhanced to shut up tcsh-users (Real Soon Now).
d599 3
a601 1
maintaining the mailing list.
@


1.4
log
@Mods for monthly posting 22/2/93
@
text
@d1 2
a2 2
Archive-Name: zsh.FAQ
Last-Modified: 22 Feb 1993
d4 2
a6 2
$Id: FAQ,v 1.3 1993/02/04 10:17:55 pws Exp pws $

d9 2
a10 1
interpreter for many UNIX systems.
d17 2
a18 2
posted bi-weekly to the Usenet news groups comp.unix.questions,
comp.unix.shells and news.answers with answers to general questions
d26 31
a56 1
problems, go to 17.
d114 4
a117 1
  necessary #define's, etc., without human intervention.
d122 3
a124 3
  The latest production version is 2.3.1, which has just been released.
  The current beta version is 2.4.  New patches occur frequently and are
  added to the archive (next question).
d129 8
a136 4
  Bas de Bakker (bas@@phys.uva.nl) has recently taking over the archive
  and the latest version is available from:
	carlo.phys.uva.nl (145.18.220.25):/pub/bas/zsh/zsh-2.4.tar.Z
  The latest full release is in zsh-2.3.1.tar.Z in the same directory.
d169 1
d181 3
a183 3
    Variable assignments with tilde expansions are special-cased.
    In `let "i = foo"', foo is not evaluated as an expression
      (although in `let "i = $foo"' it is).
a187 1
    To turn off signal traps, use `trap - <signo>', not `trap <signo>'.
a218 23
  iv) specific features:

  Things that zsh is particularly good at (no claim of exclusivity is made,
  especially as shells copy one another) include:
    Command line editing:
      multi-line commands,
      variable editing,
      command buffer stack,
      execution of unbound commands,
      menu completion,
      variable, host, editing function and option name completion,
      inline expansion of variables, history commands,
      path expansion (=foo).
    Globbing:
      recursive globbing (c.f find),
      file attribute qualifiers,
      full alternation and negation of patterns.
    Large number of options for tailoring.
    Adaptable messages for spelling, watch, time as well as prompt.
    Named directories.
    Comprehensive integer arithmetic.
    Manipulation of arrays.
    Spelling correction.
a219 1

d378 9
a386 21
  The way ~'s are inserted into variables is rather bug-ridden and well
  in need of an overhaul.  The short answer is: to get your tildes
  expanded both in the shell's copy of the path/PATH (remember, the
  former is a zsh array, the latter a colon-separated list), or any
  other such variable (CDPATH, FIGNORE, FPATH, HOSTS, MAILPATH, MANPATH)
  it's safe as long as you do any exporting and the assignment in
  separate statements (i.e. `export CDPATH', then `CDPATH=...'), and
  also as long as you don't mind any tildes at the beginning of elements
  of the path being expanded (usually, but not always, that will be the
  case).

  The reason is twofold: first, that assignments after typeset, export
  etc. are not as clever as ordinary assignments (that's a bug): in
  particular all variables, whether quoted or not, have the first tilde
  expanded, and variables which are being set for the first time _only_
  have that tilde expanded.  Also note that ordinary assignments in
  quotes don't expand the tilde (that's not a bug), but assignments to
  colon-separated lists inside quotes always expand all tildes (that is
  a bug).  This can be very confusing; but as long as you want tildes to
  be expanded and follow the rules in the previous paragraph it should
  be all right.
d453 2
a454 1
  !-2:$.  There may soon be an option to change this behaviour.
d505 4
d515 3
a517 7
  against differences from ksh in question 5).  Bugs marked [2.4] are
  fixed in patches which should appear in early versions of the next
  release.

  Assignments in export, typeset, etc., are not as general as
    ordinary parameter assignments.
  Assigments in a typeset are overenthusiastic about tildes.
d519 1
d522 1
d525 2
a526 1
  Problems with `tty error' in zle with interrupt handling.
d528 1
d532 2
a533 1
  If a command has both file and command completion enabled,
d536 1
a538 2
  `if (( 1 )) command' and `if (( 1 )) { ...' do not work
    (and related syntax problems).
d540 1
a540 2
  Various combinations of completion commands do not work properly.
  The `histlit' option adds newlines to lines in the history.
d555 3
d561 1
a561 1
  `compctl' to be enhanced to shut up tcsh-users.
d565 1
a565 1
  Binding of external commands to zle functions.
d567 1
d574 2
a575 1
Bakker for their hard work as archivists.
@


1.3
log
@Modified for 2.3.1 release
@
text
@d2 1
d5 1
a5 1
$Id: zsh.FAQ,v 1.1 1992/12/14 15:26:33 pws Exp pws $
d39 13
a51 9
9) Why does `$vble' where vble="foo bar" not do what I expect?
10) How does base arithmetic work?
11) How do I get a newline in my prompt?
12) Why does `bindkey ^a command-name' do something funny?
13) How do I reference command `foo' from within function `foo'?
14) I don't have root access: how do I make zsh my login shell?
15) What bugs are currently known and unfixed?
16) Where do I report bugs, get more info / who's working on zsh?
17) What's on the wish-list?
d89 2
a90 2
  New patches occur frequently and are added to the archive (next
  question).
d95 4
a98 8
  The current release is available for anonymous FTP from
	cs.ucsd.edu (132.239.51.3):pub/zsh/zsh2.3.1.tar.Z
  The archive maintainer currently is Jim Mattson <mattson@@cs.UCSD.EDU>,
  who also reads the mailing list.

  Bas de Bakker (bas@@phys.uva.nl) will shortly be taking over the archive
  and new patches are likely to be available from:
	carlo.phys.uva.nl (145.18.220.25):/pub/bas/zsh
d100 2
a101 2
  Richard Ohnemus will probably have a North American reflector at
  ftp.sterling.com.
a137 2
    The -- flag to terminate option processing is not recognised
       as an argument to the shell (it is recognised by set).
d139 2
d143 2
d362 24
a385 1
10) How does base arithmetic work?
d387 2
d408 1
a408 1
11) How do I get a newline in my prompt?
d419 1
a419 1
12) Why does `bindkey ^a command-name' do something funny?
d427 1
a427 1
13) How do I reference command `foo' from within function `foo'?
d436 17
a452 1
14) I don't have root access: how do I make zsh my login shell?
d454 18
d503 1
a503 1
15) What bugs are currently known and unfixed?
d507 1
a507 1
  Carvalho <carlos@@snfep1.if.usp.br>. Many of these can also be counted
d512 3
a514 4
  Unsetting multiply-named functions via a name other than the first
    crashes the shell. [2.4]
  Functions are a bit half-hearted about local variables. [2.4]
  `return' in a trap simply returns from the trap. [2.4]
d517 1
d520 1
a520 2
  Killing a command substitution in a loop doesn't kill the loop. [2.4]
  Assigments in a typeset are overenthusiastic about tildes.
a521 1
  `echo  !-2:$ !$' substitutes !-2:$ twice.
a522 1
  `echo -n ^V^J!<return>' causes a shell crash [2.4]
a523 1
    `.' doesn't repeat `x' (repeats command before `x').
a524 1
    `.' doesn't repeat count for `s', `cw', `dw', `r' (and others?).
d533 2
d537 1
a537 1
16) Where do I report bugs, get more info / who's working on zsh?
d550 1
a550 4
17) What's on the wish-list?

  Have a go at any of these, but no more enhancements are being taken
  before the next release.
d556 1
a556 1
  Binding of external commands to zle functions (arg-passing mechanism??).
d563 2
a564 2
regarding this document; thanks to Jim Mattson for his hard work as
archivist.
@


1.2
log
@Mods for first monthly posting
@
text
@d37 10
a46 11
8) What can I do about zsh not dying when I exit my xterm/shelltool?
9) Why does my terminal act funny in way x?
10) Why does `$vble' where vble="foo bar" not do what I expect?
11) How does base arithmetic work?
12) How do I get a newline in my prompt?
13) Why does `bindkey ^a command-name' do something funny?
14) How do I reference command `foo' from within function `foo'?
15) I don't have root access: how do I make zsh my login shell?
16) What bugs are currently known and unfixed?
17) Where do I report bugs, get more info / who's working on zsh?
18) What's on the wish-list?
d63 2
a64 2
  For more information, the file doc/intro.txt or doc/intro.troff
  included with the source distribution is highly recommended.  The
d83 3
a85 5
  The last production version was 2.2, but a beta release version of 2.3
  is available and should become the production version soon.  New
  patches occur frequently and are added to the archive (next question).
  The current patch level is 100; only bug fixes are being added until
  the full release of zsh2.3.
d90 11
a100 12
  The current patch level, as well as previous releases 2.1 and 2.2, are
  available for anonymous FTP from
	cs.ucsd.edu (132.239.51.3):pub/zsh
  The latest version is in the subdirectory zsh2.3.beta as
  zsh2.3.beta.tar.Z along with patches since the release of version 2.2:
  these files are definitive.  Note that, in the beta-version only,
  files are maintained by RCS (the Revision Control System: available
  from GNU archives), so that if you do not have RCS you have some
  hacking to do.  The archive maintainer currently is Jim Mattson
  <mattson@@cs.UCSD.EDU>, who also reads the mailing list.  

  Note this is likely to change at the end of February; watch this space.
d121 1
a121 1
      braces are unnecessary: $a[1] == ${a[1]}.
a123 1
    To turn off signal traps, use `trap - <signo>', not `trap <signo>'.
d137 2
d140 1
a140 1
    Nesting of double quotes within backquotes is different.
d145 2
a146 2
  The following are particularly near the feature/bug borderline:
    Variables exported but not set appear as a blank in the environment.
d153 3
a155 4
  certainly not try to run scripts without modification.  Bart Schaefer's
  c2z script is provided with the source (in scripts/c2z) to help
  convert .cshrc and .login files, but note the next question concerning
  aliases which have arguments.
d297 1
a297 5
8) What can I do about zsh not dying when I exit my xterm/shelltool?

  This problem is thought to have been fixed in recent patches.  If you
  can reproduce it in the current version of 2.3.beta, please tell
  zsh-list about it.
a298 3

9) Why does my terminal act funny in way x?

d323 1
a323 1
10) Why does `$var' where var="foo bar" not do what I expect?
d359 1
a359 1
11) How does base arithmetic work?
d364 1
a364 1
	(( foo = 16[ff] ))
d380 1
a380 1
12) How do I get a newline in my prompt?
d391 1
a391 1
13) Why does `bindkey ^a command-name' do something funny?
d399 1
a399 1
14) How do I reference command `foo' from within function `foo'?
d402 4
a405 1
  aliases, but you do with functions.
d408 1
a408 1
15) I don't have root access: how do I make zsh my login shell?
d426 1
a426 2
  (in each case the -l tells zsh it is a login shell).  Don't try
  putting this line in .cshrc.
d428 11
a439 1
16) What bugs are currently known and unfixed?
d441 2
d444 10
a453 5
  order of significance.  Thanks to Rick Lyons for some of this list and
  the wish-list in 18).  Many of these can also be counted against
  differences from ksh in question 5).

  `trap' will not reset traps while a trap is executing.
d455 1
a455 1
  Functions are a bit half-hearted about local variables.
d457 7
a467 1
  Multiple glob qualifiers with numbers can't be used simultaneously.
a470 1
  `if (( 1 )) command' and `if (( 1 )) { ...' do not work.
d472 4
a475 2
  Output of `jobs' (to stderr) is empty if piped (it's run in a subshell).
  Funny behaviour redirecting stderr with noclobber if an error occurs.
d478 1
a478 1
17) Where do I report bugs, get more info / who's working on zsh?
d491 1
a491 1
18) What's on the wish-list?
d507 2
a508 1
regarding this document.
@


1.1
log
@Initial revision
@
text
@d1 2
a2 1
$Id:$
d4 2
d59 10
a68 9
  It was written by Paul Falstad when a student at Princeton; however,
  Paul doesn't maintain it any more and enquiries should be sent to the
  mailing list (see question 17).  It is freely available to anyone under
  unrestrictive conditions.

  For more information, see the file doc/intro.txt or doc/intro.troff
  included with the source distribution (this is still valid although
  now a bit behind the times).  A list of features is given in FEATURES,
  also with the source.
d79 1
a79 1
  necessary #define's, etc. without human intervention.
d85 4
a88 3
  is available.  New patches occur frequently and are added to the
  archive (next question).  The current patch level is 82; only bug
  fixes are being added until the full release of zsh2.3.
d102 3
a104 2
  <mattson@@cs.UCSD.EDU>, who also reads the mailing list.  This is
  likely to change in February 1993.
d228 1
a228 5
  better solved by defining the special function chpwd() (see manual).

  As well as `builtin', note the similar feature `command' (see also
  question 14) when redefining an external command:
         ls() { echo Listing of $*; command ls $*; }
d233 54
d288 1
d297 2
d357 3
d440 4
a443 4
  Here are some of the more well-known ones.  Thanks to Rick Lyons
  <pclink@@qld.tne.oz.au> for some of this list and the wish-list in 8).
  Many of these can also be counted against differences from ksh in
  question 9).
d445 4
a448 1
  `if (( 1 )) command' and `if (( 1 )) { ...' do not work.
d453 1
d457 1
a457 1
  Need range checking on history arguments.
d459 1
a459 5
  Output of `functions' mangles quotes.
  Output of `jobs' (to stderr) disappears if piped.
  `bindkey -m -e' ignores the -m.
  Certain built-ins won't allow the `VAR=value command ...' assignment.
  Child processes are lost when attached by another process.
a460 3
  `return' in a shell script should act as `exit'.
  `trap' will not reset traps while a trap is executing.
  Functions are a bit half-hearted about local variables.
d485 8
a492 1
  Binding of external commands to zle functions (arg-passing mechanism??)
@
