8000 printf: incomplete conversions are too fatal · Issue #5532 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

printf: incomplete conversions are too fatal #5532

@floam

Description

@floam

This is not correct behavior:

$ printf %d 15.1
15.1: value not completely converted

A value not completely converted should still output what it was able to convert to stdout, after the error message on stderr:

$ printf %d 15.1
15.1: value not completely converted
15

IEEE Std 1003.1-2017:

If an argument operand cannot be completely converted into an internal value appropriate to the corresponding conversion specification, a diagnostic message shall be written to standard error and the utility shall not exit with a zero exit status, but shall continue processing any remaining operands and shall write the value accumulated at the time the error was detected to standard output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0