Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH Re: 5.3: printf -
- X-seq: zsh-workers 40201
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Chet Ramey <chet.ramey@xxxxxxxx>
- Subject: Re: PATCH Re: 5.3: printf -
- Date: Thu, 15 Dec 2016 22:45:12 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=IkQXhozZ6OxqlbA 6bLQYzYjuyU4=; b=SnBG1R/u2NhEb+bdMxPr4VTOWvQ2Y0lEySOlFvls+yZO8R8 fvpLfmr1gul441iQdVrj4uaacOOIBoPhthrPD6OYpRsvQbJCgtl1r99fEhUOaqQe 65hKAvtBFyWtQnoQ01EWhG1Zyp84dv+Jg3Ch4350XSlsRpUIV83UqfCCRluM=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=IkQXhozZ6Oxqlb A6bLQYzYjuyU4=; b=SAJ7DwdK2+rtxmreKrvdY1S4nfOJjNUwvbq1XU8Ckfsho6 BZkY+AYCyXcuhOCtn8fhgqB9D2xeaBhdZRE5cjpAs07G8fN8x/4wO9VkeHqjuOHB 0KoUG67dPPD3us97L5zfqjwHr/4kEvnj8D/KQYnhlWK3IbI8MuYb7z7SkKyYs=
- In-reply-to: <a582aa63-3f89-6921-564d-61b69efdce20@case.edu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161212234102.GB5457@fujitsu.shahaf.local2> <161212202110.ZM19667@torch.brasslantern.com> <CGME20161214044835epcas1p363f68aa2155487af59907b878d702464@epcas1p3.samsung.com> <161213204815.ZM24665@torch.brasslantern.com> <20161214093922.40d1eec2@pwslap01u.europe.root.pri> <20161214165148.GA16528@fujitsu.shahaf.local2> <161214104450.ZM27360@torch.brasslantern.com> <20161215005017.GA6674@fujitsu.shahaf.local2> <a582aa63-3f89-6921-564d-61b69efdce20@case.edu>
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