bug-bash
[Top][All Lists]
Advanced

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

Re: Bash with colors?


From: Antonio Macchi
Subject: Re: Bash with colors?
Date: Mon, 16 Feb 2009 06:29:11 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080213)

Start at
http://bash-hackers.org/wiki/doku.php/scripting/terminalcodes

commands like "ls --color" does not use terminfo capabilities...


$ hexdump -c <(TERM=xterm ls -d / --color=always)
0000000 033   [   0   0   m 033   [   0   1   ;   3   4   m   / 033   [
0000010   0   0   m  \n 033   [   m
0000017

$ hexdump -c <(TERM=dumb ls -d / --color=always)
0000000 033   [   0   0   m 033   [   0   1   ;   3   4   m   / 033   [
0000010   0   0   m  \n 033   [   m
0000017



...use instead fixed strings (without regards about TERMinal)
is this a good (and safe) choice too?




reply via email to

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