On Tue, 27 Dec 2016 11:26:07 +0100
Laslo Hunhold <d...@frign.de> wrote:

> On Fri, 25 Mar 2016 21:31:37 +0100
> Mattias Andrée <maand...@kth.se> wrote:
> 
> Hey Mattias,
> 
> >  basename.c |  5 ++++-
> >  dirname.c  |  6 +++++-
> >  printf.c   | 12 ++++++++----
> >  3 files changed, 17 insertions(+), 6 deletions(-)  
> 
> I do not support this patch, as "--" only makes sense for
> tools that actually take flags.
> I pity that GNU basename(1), dirname(1) and printf(1)
> take flags, however, see great value in being able to do
> 
>       $ printf --
> 
> and get what you asked for instead of some error message
> 
>       printf: usage: printf [-v var] format [arguments]
> 
> Cheers
> 
> Laslo
> 

POSIX says “--” should be supported unless stated otherwise.
I interpret that standard saying that this also applies utilities
that do not take any flags. And to be on the safe side I think
it is a good idea to support “--” for two reasons: (1) existing
scripts may require it, and (2) if POSIX adds a flag to the
utility in the future we must support “--” now, otherwise
compatibility will be broken.

Attachment: pgpNxFM3rLXhu.pgp
Description: OpenPGP digital signature

Reply via email to