Thank you for opening this bug and helping make Ubuntu better. The "ESC[m" sequence at the end of a 'ls --color' (or --color=auto, or --color=always) is added to reset the colouring to the default values.
I am not sure, however, on how necessary this is -- a _few_ tests I performed, on a hacked version of 'ls' that does *not* add in the reset sequence showed no problems -- but, again, (1) few tests; (2) rather incomplete; (3) and I am quite sure this is there because some terminal needs it...
Nevertheless, I cannot repeat your problem -- if I pipe 'ls' output to another programme, I see *no* colouring codes being output. As such, I wonder if you are forcing '--color=always' to the pipe. This would, most probably, be a bad move.
Thank you for opening this bug and helping make Ubuntu better. The "ESC[m" sequence at the end of a 'ls --color' (or --color=auto, or --color=always) is added to reset the colouring to the default values.
I am not sure, however, on how necessary this is -- a _few_ tests I performed, on a hacked version of 'ls' that does *not* add in the reset sequence showed no problems -- but, again, (1) few tests; (2) rather incomplete; (3) and I am quite sure this is there because some terminal needs it...
Nevertheless, I cannot repeat your problem -- if I pipe 'ls' output to another programme, I see *no* colouring codes being output. As such, I wonder if you are forcing '--color=always' to the pipe. This would, most probably, be a bad move.