4 ms·
Usually tools support a `--` option for that, e.g. with `rm`: rm -- --file-that-looks-like-a-flag
by vore 4y ago
Usually tools support a `--` option for that, e.g. with `rm`:
rm -- --file-that-looks-like-a-flag
- ben0x539 4y agorm ./--file-that-looks-like-a-flag ;) (I'm always half-tempted to suggest that a "strict mode" shell should require all paths in arguments to start with either / or ./ so that anything else is unambiguously not a file.) (I spent a bunch of time with a file named -i in my home directory, you know, just in case.)