3 ms·
Even just "-" in a filename is problematic, since you can name actual files with "--" at the beginning, and the name could match a switch.
by Dwedit 19d 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.
- badc0ffee 19d agoTypically you can use the -- arg to indicate that everything to the right should not be interpreted as a switch.
- PhilipRoman 19d agoand for programs that don't respect this convention ./--file
- IsTom 19d agoYes, but typically people are not doing this on every command and if you're globbing files it'll get used as flag.