Public bug reported:

Binary package hint: command-not-found

for 'echo|cat' cnf_command is assigned value 'echo|cat'. Expected
assignment is 'echo'.

Example:

[y...@lintukoto ~/tmp/FOO]% ls
[y...@lintukoto ~/tmp/FOO]% find|grep foo
find|grep: command not found
[1 y...@lintukoto ~/tmp/FOO]% find |grep foo
[1 y...@lintukoto ~/tmp/FOO]% function cnf_preexec() {
function>         typeset -g cnf_command="${2%% *}"
function> }
[y...@lintukoto ~/tmp/FOO]% find|grep foo          
[1 y...@lintukoto ~/tmp/FOO]% 


It is important to test with command which returns non-true value. Above it is 
unexpected that 'find|grep' is printed with 'command not found' obviously such 
command does not exist.
"${1%% *}" appears to want white-space or new line to split, ending command 
with | will incorrectly continue match further 
Note, I'm not ZSH literate, I'm not recommending that the fix presented above 
is used as-is.

ProblemType: Bug
Architecture: amd64
CheckboxSubmission: 27ea4f2fd44978993c33d11dbccf69e2
CheckboxSystem: b845c366ea09c60efa3a45c1b5b21525
Date: Wed Feb 10 23:03:46 2010
DistroRelease: Ubuntu 10.04
Package: command-not-found 0.2.40ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.32-12.17-generic
SourcePackage: command-not-found
Uname: Linux 2.6.32-12-generic x86_64

** Affects: command-not-found (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

-- 
for zsh cnf_command is populated with incorrect value
https://bugs.launchpad.net/bugs/520096
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to