Skip to content

Commit e98a95d

Browse files
committed
fix unknown capabiltity issue with tmux & terminfo
fixes #102. - Add a new terminfo with better capabilities that won't cause errors - update usage in tmux.conf - update usage in zshrc - add section to README about terminal capabilities
1 parent 7e6af00 commit e98a95d

File tree

5 files changed

+35
-17
lines changed

5 files changed

+35
-17
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ Then, clone the dotfiles repository to your home directory as `~/.dotfiles`.
4444

4545
Next, the install script will perform a check to see if it is running on an OSX machine. If so, it will install Homebrew if it is not currently installed and will install the homebrew packages listed in [`brew.sh`](install/brew.sh). Then, it will run [`osx.sh`](install/osx.sh) and change some OSX configurations. This file is pretty well documented and so it is advised that you __read through and comment out any changes you do not want__. Next, nginx (installed from Homebrew) will be configured with the provided configuration file. If a `nginx.conf` file already exists in `/usr/local/etc`, a backup will be made at `/usr/local/etc/nginx/nginx.conf.original`.
4646

47+
## Terminal Capabilities
48+
49+
In order to properly support italic fonts in and out of tmux, a couple of terminal capabilities need to be described. Run the following from the root of the project:
50+
51+
```bash
52+
tic -x resources/xterm-256color-italic.terminfo
53+
tic -x resources/tmux.terminfo
54+
```
55+
4756
## ZSH Setup
4857

4958
ZSH is configured in the `zshrc.symlink` file, which will be symlinked to the home directory. The following occurs in this file:

resources/tmux-256color-italic.terminfo

Lines changed: 0 additions & 14 deletions
This file was deleted.

resources/tmux.terminfo

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
2+
#
3+
# Install:
4+
#
5+
# tic -x tmux.terminfo
6+
#
7+
# Usage:
8+
#
9+
# export TERM=tmux-256color
10+
#
11+
# A screen-256color based TERMINFO that adds the escape sequences for italic.
12+
# run to add to term db: tic tmux.terminfo
13+
14+
# add italics for tmux (based on xterm)
15+
tmux|tmux terminal multiplexer,
16+
ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@,
17+
use=xterm, use=screen,
18+
19+
# add italics for tmux (based on xterm-256color)
20+
tmux-256color|tmux with 256 colors,
21+
use=xterm-256color, use=tmux,

tmux/tmux.conf.symlink

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set -g default-command "login-shell"
22

33
# tmux display things in 256 colors
4-
set -g default-terminal "tmux-256color-italic"
4+
set -g default-terminal "tmux-256color"
55
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
66

77
set -g history-limit 20000

zsh/zshrc.symlink

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ COLOR_NONE="\e[0m"
3030
if [ -z "$TMUX" ]; then
3131
export TERM=xterm-256color-italic
3232
else
33-
export TERM=tmux-256color-italic
33+
export TERM=tmux-256color
3434
fi
3535

3636

3737
# initialize autocomplete
3838
autoload -U compinit add-zsh-hook
3939
compinit
4040

41-
prepend_path $HOME/npmbin/node_modules/.bin
41+
# prepend_path $HOME/npmbin/node_modules/.bin
4242
prepend_path /usr/local/opt/grep/libexec/gnubin
4343
prepend_path /usr/local/sbin
4444
prepend_path $DOTFILES/bin
@@ -209,3 +209,5 @@ alias ta='tmux attach'
209209
alias tls='tmux ls'
210210
alias tat='tmux attach -t'
211211
alias tns='tmux new-session -s'
212+
# fnm
213+
eval "$(fnm env --multi)"

0 commit comments

Comments
 (0)