logoalt Hacker News

montagtoday at 3:08 AM1 replyview on HN

I thought -- was typically a separator for passing a list of arguments directly to some subcommand


Replies

altairprimetoday at 5:54 AM

The historical meaning is, "do not interpret command line arguments following --"; e.g. the classical form shown by `echo > -f; rm -- -f`. Git has a more complex interpretation of it and no doubt there's others, but this root interpretation remains generally sound: It acts as a boundary between 'complex and intelligent processing of @ARGV elements' and 'every remaining element of @ARGV after -- is treated a string literal without further processing'.