Bash piping in OSX prompts command not found, sometimes Bash piping in OSX prompts command not found, sometimes bash bash

Bash piping in OSX prompts command not found, sometimes


This likely happens because you use a keyboard layout with a non-US layout (happened to me too). On German layouts, the pipe is typed with Alt+7, so chances are high that you press Alt+Space afterwards, which will produce a non-breaking space.

A quick solution: Add the line

"\xC2\xA0": " "

to your ~/.inputrc (if you are using bash). This will map non-breaking spaces to normal ones which should solve the problem.

If you want more detail (or if you are interested in how you can track down these kinds of issues), I wrote a blog post about it some time ago.


That space is not a space. Erase and replace it.


The trick with ~/.inputrc doesn't work for zsh. But here you can configure iTerm to send a space when you type alt+space, for instance