Re: [hackers] [sbase][PATCH] basename, dirname, printf: recognise -- and fail if options are used.

From: Michael Forney <>
Date: Tue, 27 Dec 2016 11:49:05 -0800

On 12/27/16, Evan Gates <> wrote:
>> I respect your opinion and have to admit that this is not an easy
>> discussion. Let's wait for some feedback and see what the others think
>> about it.
> I side with Mattias on this one. Accepting -- even in utilities that
> don't have flags has the benefits of 1) complying with POSIX so we can
> be a drop in replacement 2) consistency with all the other tools.

Actually, POSIX talks about '--' in guideline 10 of the Utility Syntax

Many tools, for example cp, say

  The cp utility shall conform to XBD Utility Syntax Guidelines .

But this is not mentioned for printf. So, the current implementation
does comply with POSIX (at least in this respect).

However, I did run into an issue with musl-cross-make which was
passing '--' to printf. This has been fixed[1] in the latest release
though. Are there many other places where scripts use -- with printf?
Can we fix those instead?

Received on Tue Dec 27 2016 - 20:49:05 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 27 2016 - 21:00:16 CET