I am using zsh

When I do ls: for any compressed file type such as .tar.gz, .tbz2, .zip I get them as white and not bold.On the other hand, in bash its color is red and in bold.

Is it possible to give different color than white to any compressed file type in zsh?

$ ls --version
ls (GNU coreutils) 8.30

I have following setup in me .zshrc file:

export CLICOLOR=1
export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
ls: aliased to ls -h --color=always -v --author --time-style=long-iso

When I remote connect to a machine default in zsh shell tar files' color is white. Than I switch to bash and switch bach to zsh, then its color is changed back to red. Is it possible to have to behavior by default in zsh?

enter image description here

  • Try running ls --color=auto
    – wjandrea
    Commented Nov 26, 2020 at 23:26
  • ls --color=auto didn't make any change still all in white
    – alper
    Commented Nov 27, 2020 at 3:16
  • What's the full value of $LS_COLORS?
    – wjandrea
    Commented Nov 27, 2020 at 3:20
  • its: :ow=1;34:tw=1;34::ow=1;34:tw=1;34:
    – alper
    Commented Nov 27, 2020 at 3:22

1 Answer 1


Based on your comment, your $LS_COLORS doesn't include any compressed files, or any file extensions at all for that matter.


To start:

export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:*.tar=1;31:*.gz=1;31:*.tbz2=1;31"

In full for compressed files, you could add this:


  • For full compressed files should I do as follows: export LS_COLORS="$LS_COLORS:<your_answer>" ?
    – alper
    Commented Nov 27, 2020 at 3:30
  • 1
    @alper Yes, exactly. I tried putting that in the answer but it was hard to read. :p
    – wjandrea
    Commented Nov 27, 2020 at 3:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .