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

  • What is $TERM set to? Does type htop give you the expected path to that command? – Kurtis Rader Apr 1 '19 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 '19 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. – Kurtis Rader Apr 1 '19 at 23:12
  • What exact version of macOS? – Spiff Apr 2 '19 at 0:03
  • 10.14.3 macOS Mojave – Vey Apr 2 '19 at 6:32

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.