tcsh file autocompletion colors

joel@

Developer
I'm looking for a way to adjust the autocompletion colors in tcsh. I'm a zsh user, but I'm coming back to tcsh from time to time. In zsh I have the following in my .zshrc in order to get colorized output:

Code:
zmodload zsh/complist
zstyle ':completion:*' list-colors 'di=01;33:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:'

This allows me to control the autocompletion colors shown when I do a:

Code:
vim<SPACE><TAB>

I've also synchronized the above colors with my ls colors, resulting in the following snippet from my .zshrc:

Code:
zmodload zsh/complist
zstyle ':completion:*' list-colors
'di=01;33:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:'

export LSCOLORS="Dxfxcxdxbxegedabagacad"

I can't seem to get this working in tcsh though. LSCOLORS is no problem, but I can't find any knob for the autocompletion colors. Let me illustrate the problem: Using zsh with the above setting, I can do ls and get the following colorized output:

ByWJt.png


Again with zsh, and this time testing colorized autocompletion by doing vim<SPACE><TAB>:

LOvDg.png


Now, let's try tcsh instead. ls looks like this:

ZKJjA.png


...and now autocompletion with tcsh by doing vim<SPACE><TAB>:

d8NeI.png


Anyone got any ideas?
 
Solved it. This did the trick:

Code:
setenv LS_COLORS "di=01;33:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:"

I thought LS_COLORS was something Linux used for setting your ls colors, but apparently tcsh wants it for autocompletion as well. Confusing...
 
Didn't work for me. Am I doing something wrong?

I'm using tcsh under FreeBSD 8.2 amd64 in KDE "konsole" terminal.

I did (I know, the first line overrode my LSCOLORS):
Code:
$ setenv LSCOLORS "Dxfxcxdxbxegedabagacad"
$ setenv LS_COLORS "di=01;33:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:"

Code:
$ echo $LS_COLORS; echo $LSCOLORS
di=01;33:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:
Dxfxcxdxbxegedabagacad

Working great in ls, but there is no colored output in autocompletion. For example:
vim<SPACE><CTRL+D>
 
joel@ said:
Do you have
Code:
set color
in your .tcshrc? If not, add it.

Thanks a lot, it worked. Probably it's also the reason why lscolors doesn't work under Kubuntu in tcsh at work (maybe BASH is awesome for scripting, but using it in the console killing me).
 
Back
Top