about summary refs log tree commit diff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README132
1 files changed, 125 insertions, 7 deletions
diff --git a/README b/README
index 3ef8afcd1..8c11e6833 100644
--- a/README
+++ b/README
@@ -5,12 +5,12 @@ THE Z SHELL (ZSH)
 Version
 -------
 
-This is version 5.8 of the shell.  This is a security and feature release.
-There are a few visible improvements since 5.7, as well as many bugfixes.
+This is version 5.9 of the shell.  This is a security and feature release.
+There are several visible improvements since 5.8.1, as well as bug fixes.
 All zsh installations are encouraged to upgrade as soon as possible.
 
 Note in particular the changes highlighted under "Incompatibilities since
-5.7.1" below.  See NEWS for more information.
+5.8.1" below.  See NEWS for more information.
 
 Installing Zsh
 --------------
@@ -31,9 +31,110 @@ Zsh is a shell with lots of features.  For a list of some of these, see the
 file FEATURES, and for the latest changes see NEWS.  For more
 details, see the documentation.
 
-Incompatibilities since 5.8
+Incompatibilities since 5.9
 ---------------------------
 
+The line editor's default keymap is now the "emacs" keymap regardless of the
+value of the environment variables $VISUAL and $EDITOR.  This only affects you
+if your $VISUAL or $EDITOR environment variable is set to a value that
+contains the string "vi".  To get the previous behaviour, add
+
+    bindkey -v
+
+or, if your $VISUAL and $EDITOR environment variables vary,
+
+    if [[ ${VISUAL} == *vi* || ${EDITOR} == *vi* ]]; then
+        bindkey -v
+    else
+        bindkey -e
+    fi
+
+to your .zshrc file.  These snippets are compatible with previous
+versions of the shell.
+
+The ERR_EXIT and ERR_RETURN options were refined to be more self-
+consistent and better aligned with the POSIX-2017 specification of
+`set -e`:
+
+  - Function calls or anonymous functions prefixed with `!` now never
+    trigger exit or return. Negated function calls or anonymous
+    functions used to trigger exit or return if ERR_EXIT or ERR_RETURN
+    was set and the function call or anonymous function returned a
+    zero exit status. Example:
+
+      setopt ERR_EXIT
+      f() { true }
+      ! f
+      echo "This is printed only since 5.10."
+
+  - The `always` command now ignores ERR_EXIT and ERR_RETURN, as other
+    complex commands do, if its exit status comes from a command
+    executed while the option is ignored. Example:
+
+      setopt ERR_EXIT
+      { false && true } always { echo "This was and still is printed." }
+      echo "This is printed only since 5.10."
+
+  - Function calls, anonymous functions, and the `eval`, `.`, and
+    `source` builtins now never ignore ERR_EXIT and ERR_RETURN on
+    their own. These commands used to ignore ERR_EXIT and ERR_RETURN
+    if their result came from a complex command (if, for, ...) whose
+    result came from a command executed while the option is
+    ignored. Example:
+
+      setopt ERR_EXIT
+      f() { if true; then false && true; fi }
+      f
+      echo "This is printed only prior to 5.10."
+
+  - The `&&` and `||` operators now always ignore ERR_RETURN in their
+    left operand. Until this version, the operators failed to ignored
+    ERR_RETURN in their left operand if they were executed as part of
+    a function call or an anonymous function that was itself executed
+    in a context where ERR_RETURN is ignored. Example:
+
+      setopt ERR_RETURN
+      f() { { false; echo "This is printed only since 5.10." } || true }
+      if f; then true; fi
+
+PCRE support is now PCRE2.
+
+Parameter names may begin with a "." and follow a relaxed implementation
+of ksh namespace syntax.  Expansion of such parameters must use braces,
+that is, in ${.param.name} form.  Parameters so named are excluded from
+`typeset` and `set` output unless explicitly listed in `typeset` arguments
+or matched by a pattern with `typeset -m`.
+
+Interpretation of exclusion-patterns following alternation-patterns has
+been rationalised.  This means for example that `[[ ab = (|a*)~^(*b) ]]`
+is true where previously it was false.
+
+Improvements to handling of terminal colors and attributes in prompts
+may change the behavior of some prompt sequences, most notably in
+cases where `esq=${(%)...}` is used to capture an escape sequence.
+
+The `which` and `functions` commands output function definitions in a
+format independent of the MULTI_FUNC_DEF option.
+
+Math context no longer interprets a leading underscore as part of a
+numeric constant.
+
+Nul and characters greater than \x77 are correctly handled by `read -d`.
+
+Return values of `sysopen` from the zsh/system module have been updated
+to be more similar to other commands in that module.
+
+Tied parameters created with the zsh/db/gdbm module may not be re-tied
+as locals in nested function scope.  This prevents database corruption
+when a function scope ends.
+
+Incompatibilities between 5.8.1 and 5.9
+---------------------------------------
+
+compinit: A "y" response to the "Ignore ... and continue?" prompt removes
+insecure elements from the set of completion functions, where previously
+it ignored the compaudit result and included all elements.
+
 Build-time change: The default value of the --enable-gdbm configure
 argument has changed from "yes" to "no".  Thus, the zsh/db/gdbm module will
 not be built unless --enable-gdbm is passed explicitly.
@@ -99,11 +200,25 @@ emulate sh: When zsh emulates sh, the final command in a pipeline is now run in
 a subshell.  This differs from the behavior in the native (zsh) mode, but is
 consistent with most other sh implementations.
 
+The export and readonly builtins now ignore the -p option when there are
+operands given and POSIX_BUILTINS is enabled. This more closely matches the
+behaviour of bash and ksh.
+
 getopts now calculates OPTIND in a similar manner to other shells when the
 POSIX_BUILTINS option is enabled.
 
-Incompatibilities between 5.7.1 and 5.8
----------------------------------------
+Ignored-signal traps are now inherited by subshells when the POSIX_TRAPS
+option is enabled.
+
+emulate sh: Inf and NaN are now treated as parameter names in arithmetic
+context when zsh is emulating sh.
+
+The ${name:offset:length} expansion syntax now behaves more similarly to
+other shells in that the offset and length are applied as array indices
+prior to scalar conversion in e.g. "${*:0:2}".
+
+Incompatibilities between 5.7.1 and 5.8.1
+-----------------------------------------
 
 The history expansion !:1:t2 used to be interpreted such that the 2
 was a separate character added after the history expansion.  Now
@@ -134,6 +249,9 @@ changes made in the course of fixing CVE-2019-20044.  Please report this
 to the zsh-workers mailing list if your system is affected.  See NEWS for
 more.
 
+PROMPT_SUBST expansion is no longer performed on arguments to prompt-
+expansion sequences such as %F.
+
 Incompatibilities between 5.6.2 and 5.7.1
 -----------------------------------------
 
@@ -158,7 +276,7 @@ https://zsh.org/workers/48414 (commit zsh-5.8-348-g2c000ee7b) for details
 and an example.
 
 Incompatibilities between 5.5.1 and 5.6.2
-------------------------------------------
+-----------------------------------------
 
 The completion helper _remote_files, typically used after a hostname
 with scp-style completion, now uses remote-files instead of files as a