Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Z-Shell (zsh) FAQ changes this month
- X-seq: zsh-announce 100
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-announce@xxxxxxxxxxxxxx
- Subject: Z-Shell (zsh) FAQ changes this month
- Date: Mon, 27 Sep 1999 14:02:37 +0200
- 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
yodl 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 July 1999:
1.4 Don't even mention version 2.5
1.6 FTP site changes
2.3 $*:q does work, at least in 3.1.6
3.12 Don't mention old $[...] format any more
4 Briefly mention new 3.1.6 completion
5.1 Mention old bindings for history-search have been restored
along with behaviour.
This document contains a list of frequently-asked (or otherwise
significant) questions concerning the Z-shell, a command interpreter
for many UNIX systems which is freely available to anyone with FTP
access. Zsh is among the most powerful freely available Bourne-like
shell for interactive use.
If you have never heard of `sh', `csh' or `ksh', then you are
probably better off to start by reading a general introduction to UNIX
rather than this document.
If you just want to know how to get your hands on the latest version,
skip to question 1.6; if you want to know what to do with
insoluble problems, go to 5.2.
Notation: Quotes `like this' are ordinary textual quotation
marks. Other uses of quotation marks are input to the shell.
Contents:
Chapter 1: Introducing zsh and how to install it
1.1. Sources of information
1.2. What is it?
1.3. What is it good at?
1.4. On what machines will it run? (Plus important compilation notes)
1.5. What's the latest version?
1.6. Where do I get it?
1.7. I don't have root access: how do I make zsh my login shell?
Chapter 2: How does zsh differ from...?
2.1. sh and ksh?
2.2. csh?
2.3. Why do my csh aliases not work? (Plus other alias pitfalls.)
2.4. tcsh?
2.5. bash?
2.6. Shouldn't zsh be more/less like ksh/(t)csh?
Chapter 3: How to get various things to work
3.1. Why does `$var' where `var="foo bar"' not do what I expect?
3.2. In which startup file do I put...?
3.3. What is the difference between `export' and the ALL_EXPORT option?
3.4. How do I turn off spelling correction/globbing for a single command?
3.5. How do I get the meta key to work on my xterm?
3.6. How do I automatically display the directory in my xterm title bar?
3.7. How do I make the completion list use eight bit characters?
3.8. Why do the cursor (arrow) keys not work?
3.9. Why does my terminal act funny in some way?
3.10. Why does zsh not work in an Emacs shell mode any more?
3.11. Why do my autoloaded functions not autoload [the first time]?
3.12. How does base arithmetic work?
3.13. How do I get a newline in my prompt?
3.14. Why does `bindkey ^a command-name' or 'stty intr ^-' do something funny?
3.15. Why can't I bind \C-s and \C-q any more?
3.16. How do I execute command `foo' within function `foo'?
3.17. Why do history substitutions with single bangs do something funny?
3.18. Why does zsh kill off all my background jobs when I logout?
3.19. How do I list all my history entries?
3.20. How does the alternative loop syntax, e.g. `while {...} {...}' work?
3.21. Why is my history not being saved?
3.22. How do I get a variable's value to be evaluated as another variable?
3.23. How do I prevent the prompt overwriting output when there is no newline?
3.24. What's wrong with cut and paste on my xterm?
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 ---
1.4: 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.
There are also now separate ports for Windows and OS/2, see `Where
do I get it' below.
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 acconfig.h to configure zsh automatically,
then send the required context diffs to the list (see question
5.2). Please make sure you have the latest version first.
To get it to work, retrieve the source distribution (see question
1.6), 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 makes the signals code unusable. This often happens
on Ultrix, HP-UX, IRIX (?). Install gawk if you experience such problems.
1.6: Where do I get it?
The coordinator of development is currently me; the alias
coordinator@xxxxxxx can be used to contact whoever is in the hot
seat. The following are known mirrors (kept frequently up to date); the
first is the official archive site, currently in Australia. All are
available by anonymous FTP. The major sites keep test versions in the
`testing' subdirectory: such up-to-the-minute development versions should
only be retrieved if you actually plan to help test the latest version of
the shell. The following list also appears on the WWW at
http://www.zsh.org .
Home site ftp://ftp.zsh.org
http://www.zsh.org/pub/zsh/
Australia ftp://ftp.ips.gov.au/mirror/zsh/
Denmark ftp://sunsite.auc.dk/pub/unix/shells/zsh
Finland ftp://ftp.funet.fi/pub/unix/shells/zsh/
France ftp://ftp.cenatls.cena.dgac.fr/pub/shells/zsh/
Germany ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/
ftp://ftp.gmd.de/packages/zsh/
ftp://ftp.uni-trier.de/pub/unix/shell/zsh/
Hungary ftp://ftp.cs.elte.hu/pub/zsh/
(also http://www.cs.elte.hu/pub/zsh/ )
ftp://ftp.kfki.hu/pub/packages/zsh/
Israel ftp://ftp.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/
http://www.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/
Italy ftp://ftp.unina.it/pub/Unix/pkgs/shell/zsh/
Japan ftp://ftp.nisiq.net/pub/shells/zsh/
ftp://ftp.win.ne.jp/pub/shell/zsh/
Norway ftp://ftp.uit.no/pub/unix/shells/zsh/
Poland ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/
Romania ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/
ftp://ftp.kappa.ro/pub/mirrors/ftp.zsh.org/pub/zsh/
Slovenia ftp://ftp.siol.net/mirrors/zsh/
Sweden ftp://ftp.lysator.liu.se/pub/unix/zsh/
UK ftp://ftp.net.lut.ac.uk/zsh/
(also by FSP at port 21)
ftp://sunsite.org.uk/packages/zsh/
USA ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/
ftp://ftp.rge.com/pub/shells/zsh/
ftp://foad.org/pub/zsh/
http://foad.org/zsh/
The Windows port mentioned above is maintained separately by Amol
Deshpande <amold@xxxxxxxxxxxxx>; please mail Amol directly about any
Windows-specific problems. This is quite new, so don't expect it to
be perfect. You can get it from:
ftp://ftp.blarg.net/users/amol/zsh
Likewise the OS/2 port is available from TAMURA Kent
<kent@xxxxxxxxxxxxxx> at
http://cgi.din.or.jp/~tkent/tmp/zsh-3.0.0-os2-a01.zip
Starting from mid-October 1997, there is an archive of patches sent
to the maintainers' mailing list. Note that these may not all be
added to the shell, and some may already have been; you simply have
to search for something you might want which is not in the version
you have. Also, there may be some prerequisites earlier in the
archive. It can be found on the zsh WWW pages (as described in
1.1) at:
http://sunsite.auc.dk/zsh/Patches/
2.3: Why do my csh aliases not work? (Plus other alias pitfalls.)
First of all, check you are using the syntax
alias newcmd='list of commands'
and not
alias newcmd 'list of commands'
which won't work. (It tells you if `newcmd' and `list of commands' are
already defined as aliases.)
Otherwise, your aliases probably contain references to the command
line of the form `\!*', etc. Zsh does not handle this behaviour as it
has shell functions which provide a way of solving this problem more
consistent with other forms of argument handling. For example, the
csh alias
alias cd 'cd \!*; echo $cwd'
can be replaced by the zsh function,
cd() { builtin cd "$@"; echo $PWD; }
(the `builtin' tells zsh to use its own `cd', avoiding an infinite loop)
or, perhaps better,
cd() { builtin cd "$@"; print -D $PWD; }
(which converts your home directory to a ~). In fact, this problem is
better solved by defining the special function chpwd() (see the manual).
Note also that the `;' at the end of the function is optional in zsh,
but not in ksh or sh (for sh's where it exists).
Here is Bart Schaefer's guide to converting csh aliases for zsh.
1) If the csh alias references "parameters" (\!:1, \!* etc.),
then in zsh you need a function (referencing $1, $* etc.).
Otherwise, you can use a zsh alias.
2) If you use a zsh function, you need to refer _at_least_ to
$* in the body (inside the { }). Parameters don't magically
appear inside the { } the way they get appended to an alias.
3) If the csh alias references its own name (alias rm "rm -i"),
then in a zsh function you need the "command" keyword
(function rm() { command rm -i "$@" }), but in a zsh alias
you don't (alias rm="rm -i").
4) If you have aliases that refer to each other (alias ls "ls -C";
alias lf "ls -F" ==> lf == ls -C -F) then you must either:
o convert all of them to zsh functions; or
o after converting, be sure your .zshrc defines all of your
aliases before it defines any of your functions.
Those first four are all you really need, but here are four more for
heavy csh alias junkies:
5) Mapping from csh alias "parameter referencing" into zsh function
(assuming SH_WORD_SPLIT and KSH_ARRAYS are NOT set in zsh):
csh zsh
===== ==========
\!* $* (or $argv)
\!^ $1 (or $argv[1])
\!:1 $1
\!:2 $2 (or $argv[2], etc.)
\!$ $*[$#] (or $argv[$#], or $*[-1])
\!:1-4 $*[1,4]
\!:1- $*[1,$#-1] (or $*[1,-2])
\!^- $*[1,$#-1]
\!*:q "$@"
\!*:x $=* ($*:x doesn't work (yet))
6) Remember that it is NOT a syntax error in a zsh function to
refer to a position ($1, $2, etc.) greater than the number of
parameters. (E.g., in a csh alias, a reference to \!:5 will
cause an error if 4 or fewer arguments are given; in a zsh
function, $5 is the empty string if there are 4 or fewer
parameters.)
7) To begin a zsh alias with a - (dash, hyphen) character, use
`alias --':
csh zsh
=============== ==================
alias - "fg %-" alias -- -="fg %-"
8) Stay away from `alias -g' in zsh until you REALLY know what
you're doing.
There is one other serious problem with aliases: consider
alias l='/bin/ls -F'
l() { /bin/ls -la "$@" | more }
`l' in the function definition is in command position and is expanded
as an alias, defining `/bin/ls' and `-F' as functions which call
`/bin/ls', which gets a bit recursive. This can be avoided if you use
`function' to define a function, which doesn't expand aliases. It is
possible to argue for extra warnings somewhere in this mess. Luckily,
it is not possible to define `function' as an alias.
Bart Schaefer's rule is: Define first those aliases you expect to
use in the body of a function, but define the function first if the
alias has the same name as the function.
3.12: 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))
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.
Chapter 4: 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.
If this confuses you, you may like to know that there is a new, more
elegant completion system which appeared in version 3.1.6. This is based
on functions called automatically for completion in particular contexts
(for example, there is a function called _cd to handle completion for
the cd command) and is installed automatically with the shell, so all
you need to do, in principal, is to arrange for this to be loaded. Putting
`autoload -U compinit; compinit' in your .zshrc should be enough if
the system is installed properly. The rest of this section talks about the
old completion system.
5.1: 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 2.1; 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.
o `time' is ignored with builtins and can't be used with `{...}'.
o When showing completion lists with exactly 80 columns, some
terminals print an extra newline which messes up zsh's logic.
o `set -x' (`setopt xtrace') still has a few glitches; these
are mostly fixed in 3.1.6.
o Zsh's notion of the current line number (via $LINENO) is
sometimes not well handled, particularly when using functions and traps.
This should also work reliably from 3.0.6 and 3.1.6.
o In vi mode, `u' can go past the original modification point.
o The singlelinezle option has problems with prompts containing escapes.
o The `r' command does not work inside `$(...)' or ``...`'
expansions. This is fixed in 3.1.
o `typeset' handling is non-optimal, particularly with regard to
flags, and is ksh-incompatible in unpredictable ways. 3.1.6 has
been overhauled, but remaining glitches are to be expected.
o Nested closures in extended globbing and pattern matching, such as
[[ fofo = (fo#)# ]]
were not correctly handled, and there were problems with
complicated exclusions using `^' or `~'. These
are fixed in version 3.1.3.
Note that a few recent changes introduce incompatibilities (these
are not bugs):
Changes after zsh 3.0 (3.1.x is still currently in beta):
o The options ALWAYS_LAST_PROMPT (return to the line you were
editing after displaying completion lists) and LIST_AMBIGUOUS
(don't do AUTO_LIST if there was an unambiguous prefix that could be
inserted, i.e. only list if it is ambiguous what to insert next) are
now set by default. This is in response to complaints that too many
zsh features are never noticed by many users. To turn them off,
just put `unsetopt alwayslastprompt listambiguous' in your
.zshrc file.
o In 3.1.5, history-search-{forward,backward} only find previous
lines where the first word is the same as the current one. For
example,
comp<ESC>p
will find lines in the history like `comp -edit emacs', but not
`compress file' any more. For this reason, `\M-n' and
`\M-p' use history-beginning-search-{forward,backward} which
search for a line with the same prefix up to the cursor position.
From 3.1.6, there is a different implementation which makes this
closer (though not identical) to the old behaviour, and the
traditional bindings have been restored.. The story for the
{up,down}-line-or-search commands is similar.
o In vi insert mode, the cursor keys no longer work. The following
will bind them:
bindkey -M viins '^[[D' vi-backward-char '^[[C' vi-forward-char \
'^[[A' up-line-or-history '^[[B' down-line-or-history
(unless your terminal requires `^[O' instead of `^[['). The
rationale is that the insert mode and command mode keymaps for
keys with prefixes are now separate.
Changes since zsh 2.5:
o The left hand of an assignment is no longer substituted. Thus,
`$1=$2' will not work. You can use something like `eval
"$1=\$2"', which should have the identical effect.
o Signal traps established with the `trap' builtin are now called with
the environment of the caller, as in ksh, instead of as a new
function level. Traps established as functions (e.g. `TRAPINT()
{...}') work as before.
o 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.)
o `[[' 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.
o 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.
o `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.)
o <> performs redirection of input and output to the specified file.
For numeric globs, you now need <->.
o 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.).
o The pushd builtin has been rewritten for compatibility with other
shells. The old behavour can be achieved with a shell function.
o 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.
o 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.
o History expansion is disabled in single-quoted strings, like other
forms of expansion -- hence exclamation marks there should not be
backslashed.
o The `$HISTCHARS' variable is now `$histchars'. Currently both
are tied together for compatibility.
o The PROMPT_SUBST option now performs backquote expansion -- hence
you should quote these in prompts. (SPROMPT has changed as a result.)
o Quoting in prompts has changed: close parentheses inside ternary
expressions should be quoted with a %; history is now %!, not
!. Backslashes are no longer special.
--- End of changed items, diff from previous version follows ---
Index: zshfaq.yo
===================================================================
RCS file: /pack/anoncvs/zsh/www/FAQ/zshfaq.yo,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- zshfaq.yo 1999/07/30 09:27:17 1.45
+++ zshfaq.yo 1999/09/27 12:32:00 1.46
@@ -47,13 +47,24 @@
COMMENT(-- the following are for Usenet and must appear first)\
description(\
mydit(Archive-Name:) unix-faq/shell/zsh
-mydit(Last-Modified:) 1999/07/30
+mydit(Last-Modified:) 1999/09/27
mydit(Submitted-By:) email(pws@xxxxxxxxxxxxxxxxx (Peter Stephenson))
-mydit(Version:) $Id: zshfaq.yo,v 1.45 1999/07/30 09:27:17 pws Exp $
+mydit(Version:) $Id: zshfaq.yo,v 1.46 1999/09/27 12:32:00 pws Exp $
mydit(Posting-Frequency:) Monthly
mydit(Copyright:) (C) P.W. Stephenson, 1995--1999 (see end of document)
)
+bf(Changes since issue posted July 1999:)
+description(
+mydit(1.4) Don't even mention version 2.5
+mydit(1.6) FTP site changes
+mydit(2.3) $*:q does work, at least in 3.1.6
+mydit(3.12) Don't mention old tt($[...]) format any more
+mydit(4) Briefly mention new 3.1.6 completion
+mydit(5.1) Mention old bindings for history-search have been restored
+ along with behaviour.
+)
+
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
@@ -275,8 +286,7 @@
appreciated if you could add any necessary preprocessor code and
alter configure.in and acconfig.h to configure zsh automatically,
then send the required context diffs to the list (see question
- link(5.2)(52)). Changes based on version 2.5 are very unlikely to
- be useful.
+ link(5.2)(52)). Please make sure you have the latest version first.
To get it to work, retrieve the source distribution (see question
link(1.6)(16)), un-gzip it, un-tar it and read the INSTALL file in the top
@@ -367,6 +377,8 @@
(ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/)
mydit(Romania) url(ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/)
(ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/)
+ mydit() url(ftp://ftp.kappa.ro/pub/mirrors/ftp.zsh.org/pub/zsh/)
+(ftp://ftp.kappa.ro/pub/mirrors/ftp.zsh.org/pub/zsh/)
mydit(Slovenia) url(ftp://ftp.siol.net/mirrors/zsh/)
(ftp://ftp.siol.net/mirrors/zsh/)
mydit(Sweden) url(ftp://ftp.lysator.liu.se/pub/unix/zsh/)
@@ -636,7 +648,7 @@
it() Traps and signals:
itemize(
it()* Traps are not local to functions. The option LOCAL_TRAPS is
- be available from 3.1.6.
+ available from 3.1.6.
it() TRAPERR has become TRAPZERR (this was forced by UNICOS which
has SIGERR).
)
@@ -785,7 +797,7 @@
\!:1-4 $*[1,4]
\!:1- $*[1,$#-1] (or $*[1,-2])
\!^- $*[1,$#-1]
- \!*:q "$@" ($*:q doesn't work (yet))
+ \!*:q "$@"
\!*:x $=* ($*:x doesn't work (yet))
)
@@ -1317,9 +1329,9 @@
)
or even
verb(
- foo=$[16#ff]
+ foo=$((16#ff))
)
- (note that `foo=$((16#ff))' is now supported). The original syntax was
+ The original syntax was
verb(
(( foo = [16]ff ))
)
@@ -1606,6 +1618,16 @@
with the source in Misc/compctl-examples; completion definitions for
many of the most obvious commands can be found there.
+If this confuses you, you may like to know that there is a new, more
+elegant completion system which appeared in version 3.1.6. This is based
+on functions called automatically for completion in particular contexts
+(for example, there is a function called tt(_cd) to handle completion for
+the tt(cd) command) and is installed automatically with the shell, so all
+you need to do, in principal, is to arrange for this to be loaded. Putting
+`tt(autoload -U compinit; compinit)' in your tt(.zshrc) should be enough if
+the system is installed properly. The rest of this section talks about the
+old completion system.
+
sect(What is completion?)
`Completion' is where you hit a particular command key (TAB is the
@@ -1963,7 +1985,8 @@
mytt(\M-p) use tt(history-beginning-search-{forward,backward}) which
search for a line with the same prefix up to the cursor position.
From 3.1.6, there is a different implementation which makes this
- closer (though not identical) to the old behaviour. The story for the
+ closer (though not identical) to the old behaviour, and the
+ traditional bindings have been restored.. The story for the
tt({up,down}-line-or-search) commands is similar.
it() In vi insert mode, the cursor keys no longer work. The following
will bind them:
Messages sorted by:
Reverse Date,
Date,
Thread,
Author