4 ms·
I don't know what it is called, but it forces what comes after to be interpreted as a filepath. This is not git specific, but a common convention for CLI tools
by gizmo686 4y ago
I don't know what it is called, but it forces what comes after to be interpreted as a filepath.
This is not git specific, but a common convention for CLI tools. Try running:
> touch -- -i foo
> rm -- -i foo
And compare what happens without the "--".
- soupshield 4y agoThank you for this brilliant explanation (complete with interactive example :) I completely get it now.
- pojzon 4y agoNot only a filepath, this means pass anything past “—-“ ‘as is’ as an input and not an option flag. docker run -it nginx —- ls la
- drdec 4y agoNot a file path specifically and not an input exactly but I think the proper word would be an argument.
- soupshield 4y agoAh yes I've seen it in those kind of contexts too. Thanks everyone this has really clicked in to place for me :)
- CRConrad 4y agoObAgainstTheGuidelines: Me too.
- tremon 4y agoAnd then we have startx, which starts both an X server and the X client specified: startx /path/to/client --with --client-options and arguments -- --server-options -go --here Here, the double dash is used to separate the client options from the server options (the path to the server binary is compiled-in, IIRC).