bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#22816: bug#22816: cmp --verbose EOF message could be


From: Paul Eggert
Subject: [bug-diffutils] bug#22816: bug#22816: cmp --verbose EOF message could be more verbose
Date: Fri, 5 May 2017 08:01:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Jim Meyering wrote:
what should this print?

  cmp <(printf '1\nfoo') <(printf '1\nfoolery\n')

Good point, I didn't think of that. Also, now that I think about it more, a diagnostic ending in "after byte 0, line 0" is confusing in a command that ordinarily uses origin-1 offsets.

I installed the attached further patch.  With it, your example now outputs:

cmp: EOF on /dev/fd/63 after byte 5, line 2

This is more consistent with longstanding behavior:

$ cmp <(printf '1\nfoot') <(printf '1\nfoolery\n')
/dev/fd/63 /dev/fd/62 differ: byte 6, line 2

Attachment: 0001-cmp-improve-EOF-diagnostic.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]