Original Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/494663

Reporter complains last line of a 'ls --color=always' is unterminated,
causing grief on a pipe to 'ls -FXR'.

Indeed it is unterminated:

cer...@xango:/usr/src/buildd/coreutils/src$ ls --color=always|tail -2 |
od -Xc
0000000        2e736579        5b1b0a6f        0000006d
          y   e   s   .   o  \n 033   [   m
0000011
cer...@xango:/usr/src/buildd/coreutils/src$

I am not sure this *is* a bug, and would like input from the list.

A _few_ tests I performed, on a hacked version of 'ls' where I took out
the resetting of colours, do not show any impact in terms of terminal
colouring. Obviously, these tests are not even near being a  complete
test set

On the other hand, the only usage I can see for a 'ls --color=always' is
to produce human output -- for example, as the reporter states -- 'ls
--color=always | less -FXR'. I am pretty sure an human can discard an
empty last line.

Thank you,

..C..

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to