This is the mail archive of the cygwin-announce mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Updated: zsh-5.3-1

An updated version of zsh (zsh-5.3-1) has been released and should be
at a mirror near you real soon.  This is an upstream release.


Version 5.3 has just been released for both 32-bit and 64-bit Cygwin.
(Version 5.2 was skipped for stability reasons, but the change/release info included for history).


(From the release notes:

Changes between versions 5.2 and 5.3


     * In character classes delimited by "[" and "]" within patterns,
       whether used for filename generation (globbing) or other forms of
       pattern matching, it used not to be possible to quote "-" when used
       for a range, or "^" and "!" when used for negating a character set.
       The characters can now be quoted by any of the standard shell
       means, but note that the "[" and "]" must not be quoted. For

  [[ $a = ['a-z'] ]]

       matches if the variable a contains just one of the characters "a",
       "-" or "z" only. Previously this would have matched any lower case
       ASCII letter. Note therefore the useful fact that

  [[ $a = ["$cset"] ]]

       matches any character contained in the variable "cset". A
       consequence of this change is that variables that should have
       active ranges need (with default zsh options) to be indicated
       explicitly, e.g.

  [[ b = [${~cset}] ]]

       The "~" causes the "-" character to be active. In sh emulation the
       "~" is unncessary in this example and double quotes must be used to
       suppress the range behaviour of the "-".
     * The first argument to 'repeat' is now evaluated as an arithmetic
       expression. It was always documented to be an arithmetic
       expression, but until now the decimal integer at the start of the
       value was used and the remainder of the value discarded. This could
       lead to different behaviour if the argument contains non-numeric
       characters, or if the argument has leading zeroes and the
       OCTAL_ZEROES option is set.
     * For some time the shell has had a POSIX_TRAPS option which
       determines whether the EXIT trap has POSIX behaviour (the trap is
       only run at shell exit) or traditional zsh behaviour (the trap is
       run once and discarded when the enclosing fuction or shell exits,
       whichever happens first). The use of this option has now been made
       "sticky" on the EXIT trap --- in other words, the setting of the
       option at the point where the trap is set now determines whether
       the trap has POSIX or traditional zsh behaviour. This means that
       changing the option after the trap was set no longer has any
       Other aspects of EXIT trap handling have not changed --- there is
       still only one EXIT trap at any point in a programme, so it is not
       generally useful to combine POSIX and non-POSIX behaviour in the
       same script.
     * There was an undocumented feature dating from the early days of zsh
       that glob qualifiers consisting only of the digits 0 to 7 were
       treated as an octal file mode to "and" with the modes of files
       being tested. This has been removed in order to be more sensitive
       to syntax errors. The "f" qualifier has for many years been the
       documented way of testing file modes; it allows the "and" test
       ("*(f+1)" is the documented equivalent of "*(1)") as well as many
       other forms.
     * The completion helper function _arguments now escapes both
       backslashes and colons in the values of option arguments when
       populating the $opt_args associative array. Previously, colons were
       escaped with a backslash but backslashes were not themselves
       escaped with a backslash, which lead to ambiguity: '-x foo\:bar'
       (one argument with a backslashed colon) and '-x foo\\ bar' (two
       arguments, and the first one ends in a backslash) would both set
       $opt_args[-x] to the same value. This example assumes the -x
       option's spec declared two arguments, as in:

    _arguments : -x:foo:${action}:bar:$action

       For the more common case of non-repeatable options that take a
       single argument, completion functions now have to unescape not only
       colons but also backslashes when obtaining the option's argument
       from $opt_args.
     * Previously, if the function command_not_found_handler was run in
       place of a command-not-found error, and the function returned
       non-zero status, zsh set the status to 127 and printed an error
       message anyway. Now, the status from the handler is retained and no
       additional message is printed. The main reasons for this change are
       that it was not possible to return a non-zero status to the parent
       shell from a command executed as a replacement, and the new
       implementation is more consistent with other shells.
     * The output of "typeset -p" (and synonyms) now takes into account
       the function scope and export state of each parameter. Exported
       parameters are output as "export" commands unless the parameter is
       also local, and other parameters not local to the scope are output
       with the "-g" option. Previously, only "typeset" commands were
       output, never using "-g".
     * At spelling-correction prompt ($SPROMPT), where the choices offered
       are [nyae], previously <Enter> would be accepted to mean [N] and
       <Space> and <Tab> would be accepted to mean [Y]. Now <Space> and
       <Tab> are invalid choices: typing either of them remains at the
     * The $ary[i,j] subscript syntax to take a slice of an array behaves
       differently when both i and j are larger than the number of
       elements in the array. When i == j, such a slice always yields an
       empty array, and when i < j it always yields an array of one empty
       string element. The following example illustrates how this differs
       from past versions.

     nargs() { print $# }
     a=(one two)
     for i in 1 2 3 4; do
      for j in 1 2 3 4 5; do
       print -n "$i $j => "
       nargs "${(@)a[i,j]}"

     5.2       |  5.3 **
     1 1 => 1  |  1 1 => 1
     1 2 => 2  |  1 2 => 2
     1 3 => 2  |  1 3 => 2
     1 4 => 2  |  1 4 => 2
     1 5 => 2  |  1 5 => 2
     2 1 => 0  |  2 1 => 0
     2 2 => 1  |  2 2 => 1
     2 3 => 1  |  2 3 => 1
     2 4 => 1  |  2 4 => 1
     2 5 => 1  |  2 5 => 1
     3 1 => 0  |  3 1 => 0
     3 2 => 0  |  3 2 => 0
     3 3 => 0  |  3 3 => 0
     3 4 => 0  |  3 4 => 1   **
     3 5 => 0  |  3 5 => 1   **
     4 1 => 0  |  4 1 => 0
     4 2 => 0  |  4 2 => 0
     4 3 => 0  |  4 3 => 0
     4 4 => 1  |  4 4 => 0   **
     4 5 => 1  |  4 5 => 1


     * It is possible to enable character width support for Unicode 9 by
       configuring with `--enable-unicode9'; this compiles in some
       additional tables. At some point this support may move into a
       module, in which case the configure option will be changed to cause
       the module to be permanently loaded. This option is not useful
       unless your terminal also supports Unicode 9.
     * The new word modifier ':P' computes the physical path of the
       argument. It is different from the existing ':a' modifier which
       always resolves '/before/here/../after' to '/before/after', and
       differs from the existing ':A' modifier which resolves symlinks
       only after 'here/..' is removed, even when /before/here is itself a
       symbolic link. It is recommended to review uses of ':A' and, if
       appropriate, convert them to ':P' as soon as compatibility with 5.2
       is no longer a requirement.
     * The output of "typeset -p" uses "export" commands or the "-g"
       option for parameters that are not local to the current scope.
       Previously, all output was in the form of "typeset" commands, never
       using "-g".
     * vi-repeat-change can repeat user-defined widgets if the widget
       calls zle -f vichange.
     * The parameter $registers now makes the contents of vi register
       buffers available to user-defined widgets.
     * New vi-up-case and vi-down-case builtin widgets bound to gU/gu (or
       U/u in visual mode) for doing case conversion.
     * A new select-word-match function provides vim-style text objects
       with configurable word boundaries using the existing
       match-words-by-style mechanism.
     * Support for the conditional expression [[ -v var ]] to test if a
       variable is set for compatibility with other shells.
     * The print and printf builtins have a new option -v to assign the
       output to a variable. This is for bash compatibility but with the
       additional feature that, for an array, a separate element is used
       each time the format is reused.
     * New x: syntax in completion match specifications make it possible
       to disable match specifications hardcoded in completion functions.

Changes between versions 5.1.1 and 5.2


   The behaviour of the parameter flag (P) has changed when it appears in
   a nested parameter group, in order to make it more useful in such
   cases. A (P) in the outermost parameter group behaves as before.


     * The new module zsh/param/private can be loaded to allow the shell
       to define parameters that are private to a function scope (i.e. are
       not propagated to nested functions called within this function).
     * The parameter flag ${(P)...} is now more useful when it appears in
       a nested expansion. For example,

  typeset -A assoc=(one un two deux three trois)
  print ${${(P)name}[one]}

       now prints "un". In previous versions of the shell the value of the
       substitution was fully expanded on return from ${(P)name}, making
       associative array subscripting difficult. As a side effect, flags
       for formatting appearing in the inner substitution now affect the
       substitution of the name (into "assoc" in this case), which is not
       normally useful: flags that should apply to the value must be in
       the outer substitution.
     * The GLOB_STAR_SHORT option allows the pattern **/* to be shortened
       to just ** if no / follows. so **.c searches recursively for a file
       whose name has the suffix ".c".
     * The effect of the WARN_CREATE_GLOBAL option has been significantly
       extended, so expect it to cause additional warning messages about
       parameters created globally within function scope.


See ChangeLogs for full details.


Zsh is a UNIX command interpreter (shell) usable as an interactive login
shell and as a shell script command processor.  Of the standard shells,
zsh most closely resembles `ksh' but includes many enhancements.  Zsh has
command line editing, builtin spelling correction, programmable command
completion, shell functions (with autoloading), a history mechanism, and
a host of other features.

To update your installation, click on the "Install Cygwin now" link on the web page.  This downloads setup.exe to your system.
Save it and run setup, answer the questions and pick up 'zsh' in the
'Shell' category (you will have select it).

Note that downloads from (aka aren't
allowed due to bandwidth limitations.  This means that you will need to
find a mirror which has this update, please choose the one nearest to you:

If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

To unsubscribe from the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message.  Send email
to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-YOU=YOURDOMAIN.COM at

If you need more information on unsubscribing, start reading here:

Please read *all* of the information on unsubscribing that is available
starting at that URL.

--=> Peter A. Castro
Email: doctor at fruitbat dot org / Peter dot Castro at oracle dot com
	"Cats are just autistic Dogs" -- Dr. Tony Attwood

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]