Colours in Terminal.app

tcpip

Registered
Hi,

I know that there are some custom colours that one can apply to the Terminal sessions for simple things like inverted or bold text, but I was hoping that something a bit more, well, pretty was possible.

I usually use Eterm or Xterm or even kterm for my terminal needs, and have gotten rather used not to just to things like a colour ls, but having Mutt as a client do some nice colour enhancements....

If anyone has gotten Terminal to emulate something nicer, I'd love to know!

Thanks,
Scott
 

BatGuano2000

Registered
If you put the line 'set color' in your .tcshrc file, and use the command 'ls-F' (no space) you will get different colours for folders and whatnot.

You can alias 'ls' to 'ls-F' but this will affect using 'ls' with switchs, so I wouldn't do it. aliasing built in commands is not for everyone.
 

VGZ

Registered
Originally posted by BatGuano2000
If you put the line 'set color' in your .tcshrc file, and use the command 'ls-F' (no space) you will get different colours for folders and whatnot.

You can alias 'ls' to 'ls-F' but this will affect using 'ls' with switchs, so I wouldn't do it. aliasing built in commands is not for everyone.
Using ls-F will cause problems with almost all the options such as -l, -a, etc. Click Here to go to a topic I started on doing what you were looking for.
 

tcpip

Registered
Well, what I want to do is far beyond just the use of directory colours. Those are sometimes useful, but I use colour properties of the terminal for a variety of other applications, system log viewers, mutt, and so on.

vt100 hasn't much by way of colour support...things like xterm-color and other terminal types have much better support built in. I guess the real question is what terminal type can one set Terminal.app that will work for colour support as well as general use. I've tried xterm, for example, which does do good colour support, but gets very mucked up on redraws.

I'm sure I'll find one that works right eventually, it'll just take a while.

 

nauseum

Registered
the important colour i needed was syntax highlighting in vim (Vi IMproved)

i found a resource about this on the net (see bottom for URL) and from there i have put:

<pre>
d0|vt100|vt100-am|vt100am|dec vt100:\
:pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:eek:p=\E[m:AF=\E[3%dm:AB=\E[4%dm:\
:do=^J:co#80:li#24:cl=\E[;H\E[2J:sf=2*\ED:\
:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\
:rf=/usr/share/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[;r\E[0m\E(B\E)B\E[2J:\
:ks=\E[?1h\E=:ke=\E[?1l\E>:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
dl|vt200|vt220|vt200-js|vt220-js|dec vt200 series with jump scroll:\
:im=\E[4h:ei=\E[4l:mi:dc=\E[P:dm=:ed=:al=\E[L:dl=\E[M:\
:cs=\E[%i%d;%dr:sf=\ED:sr=\EM:sb=\EM:\
:ce=\E[K:cl=\E[H\E[J:cd=\E[J:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\
:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\
:md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
:tc=vt100:
</pre>

in a .termcap file in my $HOME dir, and:

<pre>
if ( $?TERM ) then
set t = "$TERM" # save real terminal type
eval `tset -s` # set TERMCAP to color version in .termcap
setenv TERM "$t" # reset to saved type
endif
</pre>

in my .cshrc and:

<pre>
:set background=dark
syntax on
</pre>

in my .vimrc (i compiled vim for just this reason...)

colour is certainly possible in Terminal.app, just not always obvious how to make it work. i am trying to get colour to work when using Terminal.app to ssh to a foreign server next.

the URL i found was a post from an apple employee over at the omnigroup list:

http://www.omnigroup.com/mailman/archive/macosx-admin/2000-July/003181.html

good luck.
 
Top