Hello,
If I do
ls --color=auto -lt "$@" --color | more
and that the last displayed color is red, this red color is used for all my following ls
How can I reset the color setting?
Thank =========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A ===========================================================================
On 05Dec2022 14:22, Patrick Dupre pdupre@gmx.com wrote:
If I do
ls --color=auto -lt "$@" --color | more
BTW, what's in "$@" ? For example.
and that the last displayed color is red, this red color is used for all my following ls
That's odd, and does not seem like correct behaviour. Does it do it if you do not pipe through "more"?
I can't reproduce this (Ubuntu 21.04 here, not Fedora).
How can I reset the color setting?
The --color is supposed to only control ls's decisions about how to colour the output. Does making the trailing --color either --color=never change anything?
Have you tried something like:
ls --color=auto -lt a b --color | od -c
i.e. exactly 2 filenames, the first or second or which will be "red", and examined the ANSI colour sequences in the (now small) output?
There _should_ be a "default colour" as the final colour sequence to reset the output to the terminal's default colours. That should be "ESC [ 0 m". Example:
[~]borg*> ls -ld --color=always . | od -c 0000000 d r w x r - s r - x 5 5 c a 0000020 m e r o n c a m e r o n 8 1 0000040 9 2 D e c 6 0 7 : 4 2 0000060 033 [ 0 m 033 [ 0 1 ; 3 4 m . 033 [ 0 0000100 m \n 0000102
See the "033 [ 0 m" sequence? That is the one which restore's the terminal's colour output the the default.
Cheers, Cameron Simpson cs@cskk.id.au
Thank
Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A =========================================================================== _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On 12/5/22 05:22, Patrick Dupre wrote:
Hello,
If I do
ls --color=auto -lt "$@" --color | more
and that the last displayed color is red, this red color is used for all my following ls
How can I reset the color setting?
Thank
The help facility built into the ls command may be useful to you.
ls --help
Ken
On 6/12/22 00:22, Patrick Dupre wrote:
Hello,
If I do
ls --color=auto -lt "$@" --color | more
and that the last displayed color is red, this red color is used for all my following ls
How can I reset the color setting?
I've tried your command in F37 and your issue doesn't occur for me potentially. In my situation the last colour displayed was blue for a directory, and when I issue the next ls command the first display is a directory in blue, followed by an image file in purple, a failed partial download in grey and files in white, which is exactly the same colour scheme as your command.
regards, Steve
Thank
Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A =========================================================================== _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue