2 ms·
Do you know about "--" ?
by blueflow 5y ago
Do you know about "--" ?
- hnlmorg 5y agoI do but it's not a good enough solution: - it is a GNUism so not available on all UNIX-like systems - it is something you pro-actively have to remember to put in - you cannot simply add `--` to every command because those that do not support it would fail (or worse, not fail in unexpected ways) In an ideal world operators should be out of band from data (murex does this with `config` https://murex.rocks/docs/commands/config.html https://murex.rocks/docs/commands/config.html whereas other commands might solve this with environmental variables. Neither are as convenient as flags though). In a less ideal world data should be encapsulated inside operators (see below), but this breaks globbing. command --flag1 --flag2 --data=file1 --data=file2 --data=file3 In my perfect world arguments would be typed so you could denote whether a parameter was an operator or data. However this doesn't translate well with the terse input of strings (as one does on the command line). Maybe if `--` was a standard from the beginning to act as a separator between operators and data (and enforced too, ie commands would fail if `--` wasn't present) then I'd be more forgiving for `--` as a solution.