4

I noticed that on my Mac I don't have any colors in e.g., tig, weechat, htop or ranger. On my linux I do. It happens in all terminal apps I have (alacritty, iterm and Terminal.app), in zsh, fish and bash.

I'm at a loss how to debug this. My fish syntax highlighting works, ls has colors, nvim has colors, git diff has colors. It appears to happen only in such interactive CLI apps which, I assume, use ncurses

5
  • What is $TERM set to? Does type htop give you the expected path to that command? Apr 1, 2019 at 21:55
  • $TERM is screen-256color in tmux and xterm-256color outside of tmux. type htop gives me usr/local/bin/htop as is expected since I installed it through homebrew.
    – Vey
    Apr 1, 2019 at 22:33
  • Works for me on macOS using iTerm and fish as well as the other bits you mentioned. Too, while I've seen people have problems with colored output. Usually due to the wrong TERM or a wrapper around the command that inhibits colored ouput; e.g., that ends up running htop --no-color. I've never seen a case like yours that affects only some commands. There isn't anything about macOS which would account for the problem. Apr 1, 2019 at 23:12
  • What exact version of macOS?
    – Spiff
    Apr 2, 2019 at 0:03
  • 10.14.3 macOS Mojave
    – Vey
    Apr 2, 2019 at 6:32

2 Answers 2

3

I had a .terminfo folder in my home folder, with data from invisible-island.net. Removing it brought back colors in the above mentioned commands. I then had to fix italics in tmux but that's another story (I installed the linked terminfo precisely in my efforts to fix italics in tmux.

1

For me the cause of the problem was also a custom .terminfo. I wanted to keep the .terminfo (to get italics in tmux) so I for me the best solution is

alias tig='TERM=xterm-256color tig'

Using this alias the colors return to tig.

You must log in to answer this question.

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