This seems like a common issue: you paste a simple command from somewhere into the terminal and it's not being understood by a shell:
$ echo test
$ zsh: command not found: echo test
The reason is because the words are separated with NBSP instead of space. Can the shell be instructed to consider NBSP a whitespace character?
zsh
is not breaking on the non-breaking space. Rather than changing the syntax of the shell, a better work around (for that issue that is not in zsh) could be to replace those nbsps with spcs (which they were meant to be in the first place) after pasting.⌥ Option
+Space
to get an NBSP character. This can be reproduced in bash or zsh.echo test
, then copy-pasted from Safari into Terminal.app and it works the exact same as if I had typedecho test
.