bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: echo builtin doesn't handle end-of-options flag


From: Todd A. Jacobs
Subject: Re: echo builtin doesn't handle end-of-options flag
Date: Sun, 16 Aug 2020 12:42:31 -0400

On Aug 16, 2020, at 12:21 PM, Eric Blake <eblake@redhat.com> wrote:

> I see nothing in your report about bash disobeying POSIX, but rather 
> confusion on your part about what POSIX actually requires.

I didn't say it violated POSIX. My expectations were set by the Bash Manual, 
which describes the behavior I'm expecting in the Shell Builtin Commands 
section:

> Unless otherwise noted, each builtin command documented as accepting options 
> preceded by ‘-’ accepts ‘--’ to signify the end of the options.

To be fair, the documentation later calls out that "echo does not interpret -- 
to mean the end of options", but this wasn't obvious on first reading. If the 
demonstrated behavior is correct and/or desirable, then it's not a bug. I still 
found it surprising, but I'm honestly not sure how to improve the documentation 
to draw more attention to the known behavior. Maybe it could be bolded, or 
listed as a caveat, because it's easy to overlook. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]