Setting colours of text terminals

Nemo - earth native nemo at cheeky.house.cx
Sat Mar 15 09:06:06 EST 2003


On Fri, Mar 14, 2003 at 07:05:32PM +1100, Alex Satrapa did utter:
> On Friday, March 14, 2003, at 05:23 , Nemo - earth native wrote:
> 
> >erm, I've never had to use echo:
> >
> >PS1=$'%(?.%{\e[0;36m%}.%{\e[1;31m%}%?)^ 
> >%{\e[0m%}%m%4(~.%{\e[0;34m%}.%{\e[0m%}):%{\e[0;34m%}%3~ 
> >%{\e[0;32m%}%(!.#.$) %{\e[0m%}'
> 
> That produces a prompt that is just as cryptic :)  Perhaps some 
> difference between 3.0.8 and your version of ZSH?

I'm using the same prompt on both my fileserver zsh 3.1.9-dev-6
(i686-pc-linux-gnu), and my desktop zsh 4.0.6 (i686-pc-linux-gnu)

It's certainly no less cryptic, but it saves a few echo's which just
don't strike me as clean. (which is funny coming from me, considering
the other junk I have in my prompt ;)

> If using "dircolors" to set the $LS_COLORS environment variable, you'll 
> need to include a line in your .dircolors file that specifies that your 
> $TERM is valid.  Eg, the following is required for my Mac OS X terminal:

Well, set your $TERM *somewhere*, if that's what it takes. I don't think
.dircolors is the place for it though. of course, .dircolors is just a
convenient place to put that stuff. It's just as valid in any other file,
and will need to be sourced from your shell config regardless...

Note that these days $TERM should be set from the actual terminal app
you're running and not need to be manually set anywhere... it's been a
while since I've seen otherwise. It's also been a while since I've seen
a terminal which identifies itself as something unknown, or has
capabilities that termcap (or whatever defines that stuff) doesn't know
about... so if that's the case, then I'd be lost. 

> Then you should alias "ls" to something like "ls --color=auto" - well, 
> that's what I do - others might disagree on this point :)

Not me. --color=auto is dreamy ;)

.../nemo
-- 
  ------------------------------------------ --------------------------
                                                    earth native


More information about the linux mailing list