# tcsh file autocompletion colors



## joel@ (Dec 25, 2011)

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:


```
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:


```
vim<SPACE><TAB>
```

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


```
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:







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






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






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






Anyone got any ideas?


----------



## joel@ (Dec 26, 2011)

Solved it. This did the trick:


```
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...


----------



## hedgehog (Dec 29, 2011)

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):

```
$ 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:"
```


```
$ 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@ (Dec 29, 2011)

Do you have 
	
	



```
set color
```
 in your .tcshrc? If not, add it.


----------



## hedgehog (Dec 30, 2011)

joel@ said:
			
		

> Do you have
> 
> 
> 
> ...



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).


----------

