Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH Re: 5.3: printf -



Chet Ramey wrote on Wed, Dec 14, 2016 at 20:14:31 -0500:
> On 12/14/16 7:50 PM, Daniel Shahaf wrote:
> > Bart Schaefer wrote on Wed, Dec 14, 2016 at 10:44:50 -0800:
> >> On Dec 14,  4:51pm, Daniel Shahaf wrote:
> >> }
> >> } The grandparent patch fixes all the cases given so far in this thread,
> >> } except that "printf --" and "printf -- -" yield an error and "-",
> >> } respectively - whereas in sh mode they should both print "--".
> >>
> >> Bash prints an error and "-" respectively in those two cases as well,
> >> so I think it's unclear what should happen for that in sh mode.
> > 
> > I was aiming for POSIX-compliance, not bash-compliance, for sh mode.
> 
> The format is not optional, according to Posix.

Sure.

> All shells aiming for Posix conformance throw an error on `printf --'.

This surprises me; it doesn't match my understanding of the spec.
(I thought POSIX would take "--" to be the format string.)

Cheers,

Daniel
(trying not to repeat myself _too_ much..)



Messages sorted by: Reverse Date, Date, Thread, Author