On Tue, Sep 20, 2022 at 02:34:08PM +0100, Jason McIntyre wrote: > On Tue, Sep 20, 2022 at 08:37:27AM -0300, Crystal Kolipe wrote: > > On Tue, Sep 20, 2022 at 10:54:10AM +0000, Klemens Nanni wrote: > > > Reads like pointing out the obvious and the next sentence also explains > > > how -H and -L behave due to -R, just like -H and -L descriptions > > > themselves. > > > > That's true if you only read the first two sentences, but taking the > > paragraph as a whole it goes on to say that: > > > > "The -H, -L, and -P options are ignored unless the -R option is > > specified. In addition, these options override each other and the > > command's actions are determined by the last one specified." > > > > This is ambiguous. Which options does that text suggest override > > each other? > > however it is not ambiguous here. it doesn;t make sense to think that > "these options override each other" could refer to -R, since we have > already said the options are ignored unless you specify -R.
> -R could not both override -H, for example, and simultaneously be required > to make -H work. It's only completely un-ambiguous in cases where the -R comes first: # cp -R -L But the example I gave was: > > # cp -L -R > > > > The -R does not override the -L. So sure, -R is required to use -L, but we're also explicitly told that: "These options override each other and the command's actions are determined by the last one specified" Consider: # cp -R -L -R This might happen in a script that specifies -R and -L and where extra arguments are accepted for the cp command. If the user is expecting the arguments to be parsed in the specified order, and wants to override the script's -L, they might assume that supplying an extra -R would negate the previous -L, but it doesn't. But in any case, the existing manual text makes this clear. It would only become ambiguous with the proposed change.