3 ms·
Naming a file with a "-" as the first character means you have to be careful to use "--" with commands to signify the end of options as otherwise the filename w
by ndsipa_pomu 9mo ago
Naming a file with a "-" as the first character means you have to be careful to use "--" with commands to signify the end of options as otherwise the filename will be interpreted as being additional options with unexpected results.
e.g. ls -l -- *
Even when you're not deliberately operating on the commands, it's too easy to get caught out by it with wildcards etc.
- necovek 9mo agoSure, but this would be contained to when your CWD is ~/bin or ~/.local/bin (or wherever you put your "-" scripts in).
- ndsipa_pomu 9mo agoYes, but it doesn't make it a good idea to leave potential traps lying around even if they're in a different room.