Follow-up Comment #10, bug #52137 (project findutils): James wrote in comment #8:
> In issue 6, -L and -n are specified to interact such that the last-specified takes effect. The -I option is specified, but no interaction with -L or -n is called out. > > In issue 7, we have the previously quoted phrase: > > "The -I, -L, and -n options are mutually-exclusive. Some implementations use the last one specified if more than one is given on a command line; other implementations treat combinations of the options in different ways." > > However, this quote is taken from the Rationale section which is non-normative (per the comment earlier in the document, "The following sections are informative.") > > Since the text stating that these options are mutually exclusive is non-normative, and that the text doesn't seem to indicate that the user should expect anything other than a perhaps-unexpected combination of behaviours, I'm left not totally sure that the xargs implementation is allowed to issue a diagnostic. > > Geoff, do you have an opinion on whether a diagnostic is permissible? You noticed the descriptive text changes but you missed the all-important SYNOPSIS change. Issue 6: [-I replstr][-L number][-n number Issue 7: [-I replstr|-L number|-n number] The vertical bars indicate that the options are mutually exclusive. So yes you can write a diagnostic. > If we do issue a diagnostic, but all invocations of the named utility return 0, is it still conforming for xargs also to return 0? The general rule is that if you write a diagnostic, the exit status has to be non-zero. However, in this particular case there is a get-out courtesy of XBD 12.1 item 8: "The use of conflicting mutually-exclusive arguments produces undefined results, unless a utility description specifies otherwise." Since it says the result is "undefined", you can do anything you want. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?52137> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/