Nothing more annoying than telnetting into linux
from another non-linux machine as vt100, and
run 'll' (alias 'ls -alF --color'), only to get
colors that don't jive with the telnet client.
Remembering to 'export TERM=linux' is a pain
but does not really work anyways.  I have had to
change my .basrhc file to add

if [ x`tty | grep -i tty` = x ]; then TTY_COLOR=''; else TTY_COLOR='--color'; fi
export TTY_COLOR
alias ls='ls -F  $TTY_COLOR'
alias ll='ls -al $TTY_COLOR'

Another way is ...

function _ls() { if [ x`tty | grep -i tty` = x ]; then ls -F   $*; else ls -F   
--color $*; fi }
function _ll() { if [ x`tty | grep -i tty` = x ]; then ls -alF $*; else ls -alF 
--color $*; fi }
alias ls=_ls
alias ll=_ll

Is there a color vt100 (vt200 ?) that would work with the --color option.
And if so, can the colors be defined differently depending on the color
of your background screen (white, black, or blue) ?

Anyone have some alias that works better than the above ?

Thanks... Dan.

Reply via email to