I'm using OS X Mavericks with zsh (technically the package oh-my-zsh).
I've been facing this bug for some time now and haven't found a way to fix it. Sometimes when I pipe a command it just says command not found.
For example, when I do a nmap network list scan like so nmap -sL 192.168.2.0/24 | grep ')'
I sometimes get the error zsh: command not found: grep
. Even when I use arrow up button it won't work, so I have to rewrite the command, exactly the same, and it will work.
It is really annoying and it has happened occasionally with other commands and mostly after a pipe.
Any idea why this is occurring?
The fact that it's happening only sometimes indicates that your input actually varies (subtly) from time to time.
It depends on what kind of keyboard you have, but I think it's likely that you're accidentally holding down the Alt
key while you type the space after the pipe. Alt+Space
is a non-breaking space, which zsh won't recognise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With