4 ms·
This is discussed in the featured article: https://dwheeler.com/essays/filenames-in-shell.html#dashdash https://dwheeler.com/essays/filenames-in-shell.html#dash
by Anthony-G 3y ago
This is discussed in the featured article: https://dwheeler.com/essays/filenames-in-shell.html#dashdash https://dwheeler.com/essays/filenames-in-shell.html#dashdash
As you point out, not all commands support this convention and the author feels that it would be hard to enforce this consistently among maintainers. I agree that it would be easier (for me) to remember to prefix globs with `./`.
- tyingq 3y agoI'd argue it's not quite as terrible as the author suggests. Getopt(3), for example, uses it, so many programs pick it up from there. As do many popular getopt() variations for other languages...Golang's "flag" built-in, for example. So it's not universal, but it's also more common than you might imagine.