# Zshell colouring not working



## Jellicent (Jun 20, 2013)

First off I want to apologise for posting in the wrong section, if that's the case.

My problem is about the colours used when, for example, typing `ls <tab>`. The list that is generated uses the wrong colours. To be precise, it uses the right source of colours (which I have set in .Xresources) but it uses the wrong colours, and as if that wasn't enough, it even uses the highlight version of the wrong colour.

I have been searching wherever and whatever I could think of but nothing seems to work.

Here's my .zshrc

```
# The following lines were added by compinstall

zstyle :compinstall filename '/home/jellicent/.zshrc'

if [ -f ${HOME}/.termcap ]; then
        TERMCAP=$(< ${HOME}/.termcap)
        export TERMCAP
fi

zmodload zsh/complist
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install

LSCOLORS=exfxcxdxbxaeafabagacad
export LSCOLORS
zstyle ':completion:*' list-colors ${(s.:.)LSCOLORS}
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _oldlist _expand _complete _ignored _match _prefix
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous false
zstyle ':completion:*' list-prompt 'At %p: Hit TAB for more, or the character to insert'
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**'
zstyle ':completion:*' max-errors 32
zstyle ':completion:*' menu select=1
zstyle ':completion:*' original false
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' select-prompt 'Found %l | %p'
zstyle :compinstall filename '/home/jellicent/.zshrc'


PS1=$'[ %{\e[1;30m%}%*%{\e[0m%} | %{\e[1;30m%}%n%{\e[0m%} | %{\e[1;30m%}%/ %{\e[0m%}] '

alias su='su -m'
alias rpq='ratpoison -c quit'
alias sdn='shutdown -p now'
alias rbn='shutdown -r now'
alias pdir='cd /usr/ports'
alias pmd='portmaster -d'
alias tss='scrot ~/gfx/screens/%Y%m%d.png'
alias updXr='xrdb -merge ~/.Xresources'
alias ls='ls -Ga'
```

And here's my .termcap

```
rxvt-256color|rxvt-256color terminal (X Window System):
    :Co#256:
    :tc=rxvt-unicode:
    :tc=rxvt
```


----------



## phoenix (Jun 21, 2013)

Here's my LSCOLORS and CLICOLORS from .zshrc which mimic the default Linux ls colours:

```
export LSCOLORS=ExCxFxFxBxGxGxababaeae
export CLICOLOR=$LSCOLORS
```

I've never used the tab-completion colouring, but the above colours work beautifully on a black background.  If you aren't using a black background ...

Note:  in order for ls(1) to pick up the colors, you need to add -G:

```
# Shell aliases
alias ls='ls -G'
alias ll='ls -GlA'
```


----------



## Jellicent (Jun 21, 2013)

Thank you for your reply.

I don't think that ls is the problem but rather auto-completion and the menu pressing tab offers (if it's configured that way in the shell for me) offers. As you can see in the code I posted, I've already modified my ls to use colours. That is working fine.

I'll get some screenshots to make my problem more clear.

http://abload.de/img/20130621r1u3z.png (It's a bit big, so I pasted the link instead of integrating it directly into the post.)

As you can see, when I just use `ls -GA` and press enter to send the command, it lists everything in the nice colours I have configured. And using the correct definition I gave. But if you look at the folders auto-completion menu offers me, the colours are wrong. It's from the palette I've configured, but it's using highlight red for folders, which is completely wrong, for example. And for everything else there's to see in a auto-complete tab menu - the wrong colours (all highlights though) are used.


----------



## Jellicent (Jun 21, 2013)

I'm sorry for double posting, but since I can't edit my posts yet and apparently I've solved the problem there's no point in asking for further help.

I actually have to do something like this in my .zshrc: 
	
	



```
LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:\ pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:\ ex=01;32:lc=\e[:rm=m:tc=00:sp=00:ma=07:hi=00:du=00
```

Instead of 
	
	



```
LS_COLORS=exfxcxdxbxaeafabagacad
```


----------

