Y
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
badc0ffee
81 days ago
Typically you can use the -- arg to indicate that everything to the right should not be interpreted as a switch.
link
PhilipRoman
81 days ago
and for programs that don't respect this convention ./--file
link
IsTom
81 days ago
Yes, but typically people are not doing this on every command and if you're globbing files it'll get used as flag.
link