GNU bug report logs - #14115
[PATCH] echo: adding support for '--' in option parsing

Previous Next

Package: coreutils;

Reported by: Hemmo Nieminen <hemmo.nieminen <at> iki.fi>

Date: Mon, 1 Apr 2013 15:18:01 UTC

Severity: normal

Tags: notabug, patch, wontfix

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 14115-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Hemmo Nieminen <hemmo.nieminen <at> iki.fi>
Cc: control <at> debbugs.gnu.org, 14115-done <at> debbugs.gnu.org
Subject: Re: bug#14115: [PATCH] echo: adding support for '--' in option parsing
Date: Mon, 01 Apr 2013 09:32:19 -0600
[Message part 1 (text/plain, inline)]
tag 14115 notabug wontfix
thanks

On 04/01/2013 03:49 AM, Hemmo Nieminen wrote:
> A '--' can now be used to mark the end of echo's options that should be
> parsed. This makes it possible to e.g. print lines where the first
> argument matches some of echo's options (e.g. 'echo -- -e').

Sorry, such behavior would violate POSIX, which special-cases 'echo' as
one of the few utilities that MUST NOT interpret '--' specially.  You
would end up breaking existing scripts that rely on POSIX semantics.
POSIX already admits that options to 'echo' are not portable, and that
you are better off using printf(1) if then thing you need to output
something that starts with a '-'.

I'm closing this bug as rejected, since we will not be applying the
patch; but you are free to continue discussing the issue.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 12 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.