Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Z-Shell (zsh) FAQ changes this month
- X-seq: zsh-announce 93
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-announce@xxxxxxxxxxxxxx
- Subject: Z-Shell (zsh) FAQ changes this month
- Date: Wed, 24 Mar 1999 11:46:53 +0100
- Mailing-list: contact zsh-announce-help@xxxxxxxxxxxxxx; run by ezmlm
This file contains general information on how to find out about zsh,
(the first part of the FAQ up to item 1.1), then any other items which
have changed since last month's posting, then the differences in the
text version of the FAQ. If you would like a complete individual
copy, email me and I will add you to the list.
Changes since issue posted January 1999:
1.1 Mention plain text FAQ location.
5.3 Added list of goodies which will appear in version 3.1.6,
separate from much-truncated wish-list.
This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access. Zsh is among the most powerful freely available Bourne-like
shell for interactive use.
If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.
If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.
Notation: Quotes `like this' are ordinary textual quotation
marks. Other uses of quotation marks are input to the shell.
Contents:
Chapter 1: Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run? (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?
Chapter 2: How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work? (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?
Chapter 3: How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
Chapter 4: The mysteries of completion
4.1. What is completion?
4.2. What sorts of things can be completed?
4.3. How does zsh deal with ambiguous completions?
4.4. How do I complete in the middle of words / just what's before the cursor?
4.5. How do I get started with programmable completion?
4.6. And if programmable completion isn't good enough?
Chapter 5: The future of zsh
5.1. What bugs are currently known and unfixed? (Plus recent important changes)
5.2. Where do I report bugs, get more info / who's working on zsh?
5.3. What's on the wish-list?
5.4. Will zsh have problems in the year 2000?
Acknowledgments
Copyright
--- End of Contents ---
Chapter 1: Introducing zsh and how to install it
1.1: Sources of information
Information on zsh is available via the World Wide Web. The URL
is http://sunsite.auc.dk/zsh/ (note the change of address from the
end of April 1998). The server provides this FAQ and much else and is
now maintained by Karsten Thygesen and others (mail zsh@xxxxxxxxxxxxxx
with any related messages). The FAQ is at http://sunsite.auc.dk/zsh/FAQ/ .
The site also contains some contributed zsh scripts and functions;
we are delighted to add more, or simply links to your own collection.
This document was originally written in YODL, allowing it to be converted
easily into various other formats. The master source file lives at
http://sunsite.auc.dk/zsh/FAQ/zshfaq.yo and the plain text version
can be found at http://sunsite.auc.dk/zsh/FAQ/zshfaq.txt .
Another useful source of information is the collection of FAQ articles
posted frequently to the Usenet news groups comp.unix.questions,
comp.unix.shells and comp.answers with answers to general questions
about UNIX. The fifth of the seven articles deals with shells,
including zsh, with a brief description of differences. There is
also a separate FAQ on shell differences and how to change your
shell. Usenet FAQs are available via FTP from rtfm.mit.edu and
mirrors and also on the World Wide Web; see
USA http://www.cis.ohio-state.edu/hypertext/faq/usenet/top.html
UK http://www.lib.ox.ac.uk/internet/news/faq/comp.unix.shell.html
Netherlands http://www.cs.uu.nl/wais/html/na-dir/unix-faq/shell/.html
You can also get it via email by emailing mail-server@xxxxxxxxxxxx
with, in the body of the message, `send faqs/unix-faq/shell/zsh'.
The latest version of this FAQ is also available directly from any
of the zsh archive sites listed in question 1.6.
There is now a preliminary version of a reference card for
zsh 3.0, which you can find (while it's being developed) at
http://www.ifh.de/~pws/computing/refcard.ps
This is optimised for A4 paper. The LaTeX source is in the
same place with the extension .tex. It is not a good place
from which to learn zsh for the first time.
(As a method of reading the following in Emacs, you can type \M-2
\C-x $ to make all the indented text vanish, then \M-0 \C-x $
when you are on the title you want.)
For any more eclectic information, you should contact the mailing
list: see question 5.2.
--- End of general information, changed items follow in full ---
5.3: What's on the wish-list?
With version 3, the code is much cleaner than before, but still
bears the marks of the ages and many things could be done much
better with a rewrite. A more efficient set of code for
lexing/parsing/execution might also be an advantage. Volunteers are
particularly welcome for these tasks.
Here are some things which are definitely happening, and will probably
appear in zsh 3.1.6.
o Even more powerful new completion system, based on shell functions,
allowing much more detailed control both over generation of matches
for completion and how they are inserted and displayed. A set of
functions which work `out of the box' will be available, including
many functions for external commands: files in tar archives can
be listed for extraction as if they were real files; GNU commands
which accept the `--help' option can generate completion lists for
themselves on the fly, etc., etc.
You can have old-style compctl-based completions for some commands,
and new-style ones for others; you can bind particular completion
commands of your own definition to key-strokes.
o Other completion enhancements: matching control, allowing
case-insensitive matching and wild card anchors, e.g. `z_t<TAB>'
can allow a wildcard before the `_' so that this will expand
to `zle_tricky.c' --- all under user control; completions can
be grouped.
o Case-insensitive and approximate matching in the globbing code:
for example, `(#ia2)readme' matches the string `readme'
case-insensitively with up to two errors, such as README,
READ.ME, _README_, Read!Me!. The new completion system
knows about these, allowing correcting completion, e.g.
`mkaef<TAB>' can be made to complete to `Makefile'.
o Associative arrays, declared with `typeset -A aname'; syntax
for creating, accessing and deleting elements of these.
o Users can create their own foopath/FOOPATH array/path
combinations, just like path and PATH.
o A dynamically loadable library for FTP, complete with a suite of
functions to make it easy to use. This allows you to use the shell's
capabilities for scripting, line editing, completion, I/O redirection,
directory management etc. within an FTP session.
Other future possibilities which have been suggested:
o Further improvements in integrating the line editor with shell
functions.
o Ksh compatibility could be improved.
o Option for glob qualifiers to follow perl syntax (a traditional item).
--- End of changed items, diff from previous version follows ---
Index: zshfaq.txt
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.txt,v
retrieving revision 1.10
retrieving revision 1.12
diff -u -r1.10 -r1.12
--- zshfaq.txt 1999/02/25 10:03:06 1.10
+++ zshfaq.txt 1999/03/24 10:58:44 1.12
@@ -1,19 +1,16 @@
Archive-Name: unix-faq/shell/zsh
-Last-Modified: 1999/02/05
+Last-Modified: 1999/03/24
Submitted-By: pws@xxxxxxxxxxxxxxxxx (Peter Stephenson)
-Version: $Id: zshfaq.txt,v 1.10 1999/02/25 10:03:06 pws Exp $
+Version: $Id: zshfaq.txt,v 1.12 1999/03/24 10:58:44 pws Exp $
Posting-Frequency: Monthly
Copyright: (C) P.W. Stephenson, 1995--1999 (see end of document)
Changes since issue posted January 1999:
-1.1 deleted the bit saying startup files are not mentioned.
-3.2 New: about startup files.
-3.7 we just found the PRINT_EIGHT_BIT option again...
-3.22 New: about ${(e)...} and ${${...}}.
-5.2 (In wishlist): patch exists for 3.1 to handle tying
- texinputs/TEXINPUTS etc.
+1.1 Mention plain text FAQ location.
+5.3 Added list of goodies which will appear in version 3.1.6,
+ separate from much-truncated wish-list.
This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
@@ -105,9 +102,10 @@
The site also contains some contributed zsh scripts and functions;
we are delighted to add more, or simply links to your own collection.
- This document was originally written in YODL, allowing it to be
- converted easily into various other formats. The master source
- file lives at http://sunsite.auc.dk/zsh/FAQ/zshfaq.yo .
+ This document was originally written in YODL, allowing it to be converted
+ easily into various other formats. The master source file lives at
+ http://sunsite.auc.dk/zsh/FAQ/zshfaq.yo and the plain text version
+ can be found at http://sunsite.auc.dk/zsh/FAQ/zshfaq.txt .
Another useful source of information is the collection of FAQ articles
posted frequently to the Usenet news groups comp.unix.questions,
@@ -1329,7 +1327,7 @@
stage?
There is no standard single-stage way of doing this. However, there
- is a zsh idiom (available in all versions of zsh since 5.0) for this:
+ is a zsh idiom (available in all versions of zsh since 3.0) for this:
print ${(e)E:+\$$E}
@@ -1831,18 +1829,46 @@
lexing/parsing/execution might also be an advantage. Volunteers are
particularly welcome for these tasks.
- An improved line editor, with user-definable functions and binding
- of multiple functions to keystrokes, is being developed.
+ Here are some things which are definitely happening, and will probably
+ appear in zsh 3.1.6.
- o Loadable module support (will be in 3.1 but much work still needs
- doing).
+ o Even more powerful new completion system, based on shell functions,
+ allowing much more detailed control both over generation of matches
+ for completion and how they are inserted and displayed. A set of
+ functions which work `out of the box' will be available, including
+ many functions for external commands: files in tar archives can
+ be listed for extraction as if they were real files; GNU commands
+ which accept the `--help' option can generate completion lists for
+ themselves on the fly, etc., etc.
+ You can have old-style compctl-based completions for some commands,
+ and new-style ones for others; you can bind particular completion
+ commands of your own definition to key-strokes.
+ o Other completion enhancements: matching control, allowing
+ case-insensitive matching and wild card anchors, e.g. `z_t<TAB>'
+ can allow a wildcard before the `_' so that this will expand
+ to `zle_tricky.c' --- all under user control; completions can
+ be grouped.
+ o Case-insensitive and approximate matching in the globbing code:
+ for example, `(#ia2)readme' matches the string `readme'
+ case-insensitively with up to two errors, such as README,
+ READ.ME, _README_, Read!Me!. The new completion system
+ knows about these, allowing correcting completion, e.g.
+ `mkaef<TAB>' can be made to complete to `Makefile'.
+ o Associative arrays, declared with `typeset -A aname'; syntax
+ for creating, accessing and deleting elements of these.
+ o Users can create their own foopath/FOOPATH array/path
+ combinations, just like path and PATH.
+ o A dynamically loadable library for FTP, complete with a suite of
+ functions to make it easy to use. This allows you to use the shell's
+ capabilities for scripting, line editing, completion, I/O redirection,
+ directory management etc. within an FTP session.
+
+ Other future possibilities which have been suggested:
+
+ o Further improvements in integrating the line editor with shell
+ functions.
o Ksh compatibility could be improved.
o Option for glob qualifiers to follow perl syntax (a traditional item).
- o Binding of shell functions to key strokes, accessing editing
- buffer from functions, executing zle functions as a command: now
- under development for 3.1.
- o Users should be able to create their own foopath/FOOPATH array/path
- combinations (now exists as a patch for 3.1).
5.4: Will zsh have problems in the year 2000?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author