Environment
OS: macOS Sonoma 14.5
Shell: ZSH 5.9
Keyboard: Danish
Problem
When piping two commands (using |) the command on the right side is not recognized. Eventhough it is a builtin command like echo. The weird thing is, that this is only an issue sometimes. When I delete the pipe and write it again a couple of times, eventually it works. I write the pipe on my keyboard with OPTION + i.
Example
heroku config | grep REDIS_URL
zsh: command not found: grep
heroku config | grep REDIS_URL
REDIS_URL:
The second command worked, but the first didn’t. The lines are copied directly from my shell.
Question
Any suggestions on what is going wrong?
And how I can fix this?
Both ChatGPT and Perplexity was to no help.
1