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

Re: PATCH Re: 5.3: printf -



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.  All shells aiming for
Posix conformance throw an error on `printf --'.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@xxxxxxxx    http://cnswww.cns.cwru.edu/~chet/



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