Use TERM=vscode-direct where available, for more colours

This commit is contained in:
Paul Walker
2024-01-31 11:57:00 +00:00
parent 03e651a9e8
commit 39d77dbc64

12
bashrc
View File

@@ -54,8 +54,16 @@ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
fi
if [ "$TERM" == "xterm" ] ; then
# Upgrade; I don't think I use anything which doesn't support 256 colour these days.
export TERM=xterm-256color
# If it's available, use vscode-direct (which supports 16 million
# colours via the ';' sequences; required as PuTTY doesn't
# understand the ':' sequences).
#
# https://chadaustin.me/2024/01/truecolor-terminal-emacs/
if [[ -r /usr/share/terminfo/v/vscode-direct ]] ; then
export TERM=vscode-direct
else
export TERM=xterm-256color
fi
fi
# If this is an xterm set the title to user@host:dir