Hacker News new | ask | show | jobs
by dylanfw 3502 days ago
I don't know for sure about ZSH and can't test it at the moment, but Bash has -- for this purpose. It may work in ZSH as well.
1 comments

Isn't the -- a feature of the command to stop option parsing and treat the remaining arguments as file names? AFAIK it's not a shell feature that solves quoting (and it's not that easy on Unix either, since running a program involves argument parsing instead of just passing a string).
You could define `--` as "perform no expansions for the rest of the line", then you wouldn't have to worry about globs or `{}` which is where most of my annoyances come from.

BTW `--` isn't treated specially in version 4 of Bash.