You would think, but that's not the case. At least not in bash. I haven't tried in other shells.
morgana@DESKTOP-23M0CRD:~/testrm$ ll total 0 -rw-rw-rw- 1 morgana morgana 0 Jan 31 17:13 -h morgana@DESKTOP-23M0CRD:~/testrm$ rm \\-h rm: cannot remove '\-h': No such file or directory morgana@DESKTOP-23M0CRD:~/testrm$ rm \-h rm: invalid option -- 'h' Try 'rm ./-h' to remove the file '-h'. Try 'rm --help' for more information. morgana@DESKTOP-23M0CRD:~/testrm$
Whack. Works on my machine.
Which shell are you running? Version? I would like to try it out.
Ah that might be it. I’m on zsh. I never really encountered actual shell differences before.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You would think, but that's not the case. At least not in bash. I haven't tried in other shells.
Whack. Works on my machine.
Which shell are you running? Version? I would like to try it out.
Ah that might be it. I’m on zsh. I never really encountered actual shell differences before.