Skip to content

Instantly share code, notes, and snippets.

@piec
Created January 15, 2018 09:41
Show Gist options
  • Save piec/90394e21886fee701aadbf235c5df09e to your computer and use it in GitHub Desktop.
Save piec/90394e21886fee701aadbf235c5df09e to your computer and use it in GitHub Desktop.
Check existence of tmux supported terminfo entries in ncurses' terminfo
bad bce
xterm ok
bad E3
xterm ok
bad ech
xterm ok
bad hpa
xterm ok
bad ich1
bad indn
xterm ok
bad invis
xterm ok
bad setrgbb
bad setrgbf
bad Tc
bad vpa
xterm ok
bad XT
xterm ok
# extract tmux supported terminfo entries to list
awk '/TTYCODE_[A-Z0-9]*, / { gsub("\"", ""); print $5 }' tty-term.c > list
# check missing tmux-256color terminfo entries
while read code _; do
if ! tput -T tmux-256color $code >& /dev/null; then
echo "bad $code"
if tput -T xterm-256color $code >& /dev/null; then
echo " xterm ok"
fi
fi
: echo "ok $code"
done < list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment