zsh tries to "exec" environment assignments

Bug #624565 reported by Raúl Núñez de Arenas Coronado
This bug affects 4 people
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)

Bug Description

Binary package hint: command-not-found

From a clean promt, do the following:

$ FOO=BAR false
FOO=BAR: command not found

The same applies for any command that returns non-zero status if any environment assignment exists, the first assignment is run.

The culprit is /etc/zsh_command_not_found. I haven't had the time to read the code and check for the particular piece which is causing the problem, so I cannot give a patch.

Changed in command-not-found (Ubuntu):
status: New → Confirmed
Revision history for this message
mde (mde-micahelliott) wrote :

Another example:

% (( 0 ))
((: command not found

This is a common idiom in zsh (to follow with an && or ||), so pretty important that it works.

Revision history for this message
CarstenHey (c.hey) wrote :

Fix released long ago (for the original issue and the one mentioned by mde) by using zsh's command_not_found_handler() instead of the hand written cnf_precmd()/cnf_preexec() magic in /etc/zsh_command_not_found.

Changed in command-not-found (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers