Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Information about hzoli releases

As some people requested information about this release I wrote a detailed
description. Sorry for those I did not answer. Writing this took some time.
I've just reveived my university degre on tursday so I had no time to work on
zsh or answer letters.

This file will replace the README.hzoli file, which will be moved to
ChangeLog.hzoli. Sorry for all the spelling and other language mistakes which
may occur here (you know I'm Hungarian :-)).

This file tries to describe the bugfixes and enhancements which can be found
in my zsh releases compared to the vanilla release. My release now seems to be
quite sable. I did not do any significant change for more than a month now,
and there were only very few bugreports all of them was very simple
bugs. Several people have tested this release and I use it as /bin/sh at
home. I always incorporate the changes in the baseline as soon a new release
appear and I have time. I do it with automated scripts which automatically
detect already applied patches and ask for interaction only if there are
conflicting changes.

For some technical detains about the changes read the ChangeLog.hzoli file and
get my RCS files and see the RCS comments.

This list may shrink as features/bugfixes are incorporated to the baseline.
Not all fixes are from me.

First the bugfixes. I'm almost sure, that this list is uncomplete.

Completion with fignore had some problem I do not remember which is fixed by
Sven very long ago.

Arrays without leading $ can be used in math (there was an attempt to put it
in beta9 but many parts are missing so it does not works as expected).

In math, the #\c syntax for getting the code of the character c did not work
in expressions.

There are a lot of fixes in parameter code, mostly related to using subsript
ranges in the left hand side of assignments. Also on 64 bit machines integer
-> ascii conversion used too shourt buffers which caused problems using large
numbers (sometimes only base 2 numbers caused trouble sometimes even
decimals). A signed non-decimal integer is not printed as -16#ff instead of
16#-ff (it was not a bug, but I did not like that).

changable, can be used as local parameters etc. so they behave exactly as
normal user-defined parameters (it's an old know bug that zsh handles special
parameters in a quite buggy way, but that's not fixed.

If foo is an array, "$#foo" returns the array length. This is not exatly a
bugfix, but this change makes zsh more consistend. Also it impreves ksh
kompatibility. If one wants to know the printed length of $foo, the ${(c)foo}

$=foo and ${(s:...:)foo} word splitting works even if the substitution is
inside double quotes.

Some little fixes to the where-is and describe-key-briefly zle comands.

Some other fixes to make menu completion work properly with

cshjunkiequotes did not emulate correctly csh within double or backquotes.

?, # and $ can be used in math expressions (instead of $$, $? and $#).

> <(foo) and < >(foo) redirections cause parse error (it was not really a

< <(foo) redirection fixed.

<\!foo does not do history expansion

history expansion is disabled in single quotes within double quotes:
echo "`echo '!$'`" prints !$. It is not yet perfect but not worse than
in bash since history expansion is also disabled in `echo "'!$'"`.

echo $(echo \!$) no longer expands history. This sometimes caused
infinite memory eating loops in earlier verions.

history bangchars are only escaped in the history if they were
originally escaped on the command line.

$((...)) math evaluation is done before fork now which makes assignment
and increment/decrement operators work. In fact all substitutions are done
before fork exept globbing.

All kinds of substitutions can be used on math. In the baseline release
backquote substitution did not work, neither ${foo#*.} (it worked in ((...))
but not in $[...] or $((...))). Now these thre math syntax should produce
exactly the same result.

$@"" parameters are not removed from the argument list if empty. Only "$@" is
removed, as described in the manual.

Magic-space and expand-or-compete keeps the cursor in the right place as far
as posibble. Some other related problems are also fixed (e.g. magic space can
be used after a # if interactive_comments is set and probably other fixes).

Things like ${foo:-()} and ${foo:-|} used to give a parse error but ${foo:-(})
didn't. In my version, it is the opposite.

In glob character range ] can be used as with other shells as the first
character after [ or [^. E.g. [^]] matches any character other than ].

The right hand side of parameter assignments is no longer globbed by default
(note that tidle and equals substitution is not globbing). This is compatible
with sh/ksh/bash. I added an option, GLOB_ASSIGN which can be set to restore
the old behaviour but I do not recommend the usage of this option. Use foo=(*)
syntax instead.

foo=$bar if bar is an array, assigns foo as a scalar (formerly the result was
also an array).

Prompts are set empty if the shell is not interactive

zle properly quotes the current bangchar (sometimes it quoted ! regardless of
the current setting of the $histchars parameter, and may be it ignored
sometimes no_bang_hist but I'm not sure about the later).

echo { or echo a} print the braces when ignorebraces is set.

completion works properly with complete-aliases.

i/o not redirected to /dev/null in <(...) and >(...) Again I'm not sure that
it was a bug. The former behaviour was to redirect stdin or sdtout if <(...)
or >(...) were used as an argument but not to redirect it in < <(...) or
> >(...).

${$(...)...} syntax can be used E.g. ${$(foo)#bar} gets the output of foo,
then removes bar from the beginning. So far only the ${${...}...} syntax were
allowed, so you had to write ${${:-$(foo)}#bar} which is very ugly.

Prompt substitution is now completely functional (things like
${...##...} or `...` are usable now in prompts).

Make sure that vared does not go to the previous history line with

TAB always inserts itself at the beginning of a line

History is saved if a builtin is exec'd

Leading zero no longer denotes octal. Leading 0x still means hex and it
also sets lastbase. It was not a bug, but many people did not like this

${foo:-$@} expands to the list of positional parameters (it expands to more
than one word if $# > 1, and does not cause ambuguous error). Similar for
${foo:-$bar[@]} and ${foo:-$=bar} and ${foo:-$=bar}. and all these hold for

GLOB_SUBST now does what its name suggests: tt does not do parameter expansion
on the result. That's necessary for sh compatibility, as in sh scripts eval is
used for that. It also prevents infinite loops in foo='$foo' ; echo $foo. A
new flag is provided to get back the old behaviout: ${(e)foo}. But this flag
only does substitution on the result. To glob, glob_subst should be set, or
${(e)~foo} should be used.

eval and sched works when IFS[1] != ' '.

Some corrections in the manual.

And here is the list of new features:

pushd/popd changes from Anthony Heading (it would probably get into the
baseline sooner or later).

where builtin (the features file tells that there is a where builtin but there

compctl -Q (from Zefarm) to quote the result of completion.

Glob qualifiers for the group permissions and the sticky bit.

&| backgrounding to immediately disown jobs as started.

-m option to the print builtin to print only those arguments that match a

typeset -U can be used to create arrays which has no duplicated elements. Only
the fist occurance of each duplication is kept.

If zsh is invoked as sh or ksh, the -f option disables globbing instead of
setting norcs (which is not really meaningfull if invoked as sh/ksh). In all
cases (even if invoked as zsh), the set -/+f changes the no_glob option. To
changes the no_rcs option use setopt +/-f or setopt norcs or set -o norcs
etc. ONLY set +/-f is changed.

KSH_ARRAYS option can be set for ksh compatible array handling: start
subscripts from zero, unsubscripted arrays give the first element, and
unsubscripted assignments change only the first element (exception: the
foo=(...) type assignments which always assigns the whole array).

if a parameter is used in math its value is evaluated with full arithmetic
evaluation. E.g. foo='1+1' ; echo $[foo] $[$foo] prints 2 2.

New parameter ZSHNAME containing the basename of command used to invoke zsh.

New parameter TTYIDLE containing the idle time of the current tty in seconds.

If SIGALRM is not trapped zsh will only exit on alarm if TTYIDLE >= TMOUT.  If
TTYIDLE < TMOUT a new alarm is set to TMOUT - TTYIDLE seconds.  No change in
behaviour when SIGALRM is trapped. This change was necessary to prevent a
timeout while you are typing a very long command line which would take more
than TMOUT seconds.

${foo::=bar} assigns bar to $foo, and the result is bar. SImilar to
${foo:=bar} but there is no test for whether $foo is empty or unset.

New parameter substiturion flagss (those that can be used in ${(flags)...}):
 * A to allow array assignment in ${foo:=bar} or ${foo::=bar}
 * e to substitute the result (already mentioned above)
 * @ to force splitting: e.g. ${(@)foo[1,-1]} is the same as ${foo[@]}
 * W to count words and not to ignore repeated delimeters (similar to w).
 * f to split the result at newlines
 * F to join the array result with newlines
 * p to allow print builtin escapes in parameters to flags

pwd -r prints the absolute pathname (resolving symbolic links.

emulate builtin to set emulation options. E.g. emulate csh sets all csh
emulation options (but this does not means csh emulation).

TIMEFMT feature to print time in hh:mm:ss.ttt format

If you have any problem which may be related to my changes, please contact me.
My latest release can always be ftp'ed from ftp://ktud.elte.hu/pub/zsh
directory. Here a full source package avaible as well as patches to the most
recent official release and RCS files.

Zoltan Hidvegi

Messages sorted by: Reverse Date, Date, Thread, Author