New features in zsh version 3.0
-
Traps defined by the trap builtin are now executed in the current shell
environment and not as a shell function. This means that $1 is not set
to the signal number. Of course the
TRAPxxx
functions continue working as before.
-
Traps defined by the trap builtin are reset to their default values in
subshells.
-
Option names can be prefixed by `no' to unset an
option.
setopt no_option_name
is the same as
unsetopt option_name
. This change affects the
output of the setopt and unsetopt builtins when these are
invoked without arguments. See the zshoptions manual page for
more explanation.
-
!, {, } and [[
are now reserved words. Things like
[[-z $foo]]
or {foo}
should not be
used. {foo}
still works if the
IGNORE_BRACES
option is not set but this feature
may be removed in the future. [[ -z $foo ]]
and
{ foo }
should be used instead.
-
HOSTTYPE
special parameter is removed. The new
OSTYPE, MACHTYPE
and VENDOR
parameters
should be used instead.
-
exec now saves the history in interactive shells. If you do not
like this behaviour you can alias exec to
'unset HISTFILE
; exec
'.
-
${~spec}, ${=spec} and ${^spec}
used to toggle the
effect of globsubst/shwordsplit/rcexpandparam
. Now
these force the corresponding option on. ~, = or ^
can be doubled to force the relevant option off for the substitution.
-
Explicitly requested word splitting like
${=spec}
or ${(s:delim:)spec}
will be executed even if the
substitution is double quoted.
-
The right-hand side of assignments are no longer globbed by
default hence assignment
foo=*
will assign
'*
' as a value of foo. Use the
foo=( * )
array assignment syntax to get the old
behaviour.
Alternatively the GLOB_ASSIGN
can be set to emulate
the old behaviour but the usage of this option is strongly
discouraged and this option may be completely removed in the
future.
-
When foo is an array parameter
${#foo}
will always
return the length of the array even if the substitution is
double quoted. ${(c)#foo}
should be used to get
back the old behaviour.
-
When the
prompt_subst
option is set prompts are
fully expanded using parameter expansion, command substitution
and arithmetic expansion. In 2.5 backquote substitution
was not performed in the prompts so this change might cause
problems in some startup scripts if `
is used
literally in prompts.
-
History substitution is now not performed if the history escape
character appears in a single-quoted string. This may break
some interactive shell functions which use
\!
in
single-quoted strings.
-
The
UID, EUID, GID, EGID
parameters can be assigned
now. The assignment executes the setuid(), seteuid(),
setgid(), setegid() respectively. On systems where
setuid and seteuid is not supported these
functions are emulated using setreuid which may result in
a different behaviour.
-
Assigning the
USERNAME
parameter will call
setuid(uid) where uid is the user id of the specified user.
-
The privileged (
-p
) option is automatically set on
invocation if euid != uid or egid != gid. If this option is set
no user startup files are sourced. The shell will drop
privileges when this option is unset.
-
The
=number
substitution for accessing the
directory stack is changed to ~number
to allow
=command
substitution when a command name begins
with a digit.
-
<>
is a redirection operator which opens the
standard input for both reading and writing. To match a number
use <->
.
-
Option letters
-1
and -C
for
PRINT_EXIT_VALUE
and NO_CLOBBER
are
swapped: `set -C
' sets NO_CLOBBER
and
`set -1
' sets PRINT_EXIT_VALUE
.
-
AUTO_PUSHD
behaviour is changed. Now cd without
arguments will always go to the $HOME
directory
even if AUTO_PUSHD
is set and
PUSHD_TO_HOME
is not set. If you preferred the old
behaviour you can alias cd
to pushd
.
-
IFS
word splitting with SH_WORD_SPLIT
and the splitting of the input in the read builtin has changed
in cases when IFS
contains characters other than
<space>, <tab>, <newline>
. See
the description of IFS
in the zshparam manual page
for more details.
Last modified: Sat Aug 17 14:42:49 MDT 1996