The command_not_found_handler in zsh behaves different than its bash equivalent (command_not_found_handle)
Issue
Both zsh and bash have a feature where a handler can be defined, to intercept the situation when a command is launched, but not yet available on a system.
The mechanism implemented in bash, allows to differentiate between an issue with the handler (for example a user did choose not to install the program), or a non-zero return code from the program, which was just now installed by the handler. This is not possible with `zsh', currently, it returns either 0 on success or 127 on any error, be it in the handler or in the installed program.
Environment
- Red Hat Enterprise Linux 7
zsh-5.0.2- When a
command_not_found_handleris implemented forzsh, for example,PackageKit-1.0.7includes one
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
