Installing tmux-256color for macOS
source link: https://gist.github.com/joshuarli/247018f8617e6715e1e0b5fd2d39bb6c
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Installing tmux-256color for macOS
macOS has ncurses version 5.7 which doesn't ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
The Fast Blazing Solution
Instead of tmux-256color
you can use screen-256color
, place this command into your ~/.tmux.conf
.
set-option -g default-terminal "screen-256color"
The Right Way
Firstly, we need to install latest version of ncurses by using brew
.
$ brew install ncurses
After that, we're going to use infocmp
that prints a terminfo description.
$ /usr/local/opt/ncurses/bin/infocmp tmux-256color > ~/tmux-256color.info
Finally, we need to compile the description to our system database and set default-terminal
into ~/.tmux.conf
.
$ sudo tic -xe tmux-256color tmux-256color.info
set-option -g default-terminal "tmux-256color"
RGB Colors
Also, don't forget to enable RGB. For instance, if you use Alacritty terminfo outside of tmux.
set-option -sa terminal-overrides ",alacritty:RGB"
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK