On Mon, Aug 16, 2021 at 12:53:38PM +0200, Ingo Schwarze wrote: > Hi Jason, > > Jason McIntyre wrote on Sun, Aug 15, 2021 at 11:30:05PM +0100: > > > can't we take a stance that where options override each other, > > the last one wins? > > Yes, that is possible. > > Cases exist where one option overrides another and order does not > matter - for example, "lock -n -t -1" is the same as just "lock -n", > even though -t comes after -n. > > But if options override *each other*, that means the last one wins > unless otherwise stated. > > A utility can also be designed such that some options override each > other and the first one wins, but usually, i wouldn't consider that > ideal UI design in a command line utility. In configuration files, > on the other hand, both "first one wins" and "last one wins" exist. > For that reason, nothing much seems wrong with being explicit that > the last one wins, where that is the case. > > > and then not document this fact every time. or at least document > > exceptions only? > > > > ...and continue to document where options are mutually exclusive? > > > > also the text "overrides earlier" is unclear. > > In which sense do you consider > > -f Frobnicate. Overrides earlier -u. > -l [...] > -n [...] > -u Unfrobnicate. Overrides earlier -f. > > unclear? Options exclusively appear on the command line, so i don't > see how "earlier" or "later" could possibly refer to anything else > than the position on the command line. > > Note that this seems only loosely related to martijn@'s diff, which > i think is undesirable for other, stronger reasons. > > Yours, > Ingo
hi. when i wrote my mail, i failed to understand that "overrides earlier" was really just another way of saying "mutually exclusive". i don;t find it as clear, and i don;t hugely like it, but i guess it's just my preference. i also dislike the sentence structure of "Overrides earlier -f." although it's understandable, it reads like there's a word or phrase missing. Overrides earlier instances of -f. Overrides previous -f options. i just find it clearer when we just say -x and -y are mutually exclusive. jmc