about summary refs log tree commit diff
path: root/README
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-10-05 12:14:43 +0100
committerPeter Stephenson <pws@zsh.org>2016-10-05 12:14:43 +0100
commitdc517212caf3a8263cea9587bc6e96f7ff129b59 (patch)
treeab199c0936a8de2bc3c3e81661f7cee6b0e0c2d8 /README
parent429f8ae71dc7f84b799a6d0a1f96716a7cde8806 (diff)
downloadzsh-dc517212caf3a8263cea9587bc6e96f7ff129b59.tar.gz
zsh-dc517212caf3a8263cea9587bc6e96f7ff129b59.tar.xz
zsh-dc517212caf3a8263cea9587bc6e96f7ff129b59.zip
39566: Improve usefulness of command_not_found_handler.
Don't behave as if command not found if return status is non-zero

as this may simply be the return status of the replacement command.
Let the function report a command not found instead.
Diffstat (limited to 'README')
-rw-r--r--README9
1 files changed, 9 insertions, 0 deletions
diff --git a/README b/README
index d146d4b16..ed2183d8d 100644
--- a/README
+++ b/README
@@ -101,6 +101,15 @@ 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.
 
+6) 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.
+
 Incompatibilities between 5.0.8 and 5.2
 ---------------------------------------