From dc517212caf3a8263cea9587bc6e96f7ff129b59 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 5 Oct 2016 12:14:43 +0100 Subject: 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. --- README | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'README') 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 --------------------------------------- -- cgit 1.4.1