Hacker News new | ask | show | jobs
by Dwedit 82 days ago
Even just "-" in a filename is problematic, since you can name actual files with "--" at the beginning, and the name could match a switch.
1 comments

Typically you can use the -- arg to indicate that everything to the right should not be interpreted as a switch.
and for programs that don't respect this convention ./--file
Yes, but typically people are not doing this on every command and if you're globbing files it'll get used as flag.