-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething that's not working as intendedSomething that's not working as intended
Milestone
Description
printf(1) is supposed to have this property:
The format operand shall be reused as often as necessary to satisfy the argument operands. Any extra b, c, or s conversion specifiers shall be evaluated as if a null string argument were supplied; other extra conversion specifications shall be evaluated as if a zero argument were supplied. If the format operand contains no conversion specifications and argument operands are present, the results are unspecified.
Fish doesn't do this, causing this discrepancy:
> ksh -c 'printf "%d %d\n" 1 2 3'
1 2
3 0
> zsh -c 'printf "%d %d\n" 1 2 3'
1 2
3 0
> bash -c 'printf "%d %d\n" 1 2 3'
1 2
3 0
> fish -c 'printf "%d %d\n" 1 2 3'
1 2
3 : Invalid argumentMetadata
Metadata
Assignees
Labels
bugSomething that's not working as intendedSomething that's not working as intended