]> git.ipfire.org Git - ipfire-2.x.git/blob - config/profile.d/term256.sh
Merge remote-tracking branch 'origin/next' into thirteen
[ipfire-2.x.git] / config / profile.d / term256.sh
1 # Enable 256 color capabilities for appropriate terminals
2
3 # Set this variable in your local shell config (such as ~/.bashrc)
4 # if you want remote xterms connecting to this system, to be sent 256 colors.
5 # This must be set before reading global initialization such as /etc/bashrc.
6 # SEND_256_COLORS_TO_REMOTE=1
7
8 # Terminals with any of the following set, support 256 colors (and are local)
9 local256="$COLORTERM$XTERM_VERSION$ROXTERM_ID$KONSOLE_DBUS_SESSION"
10
11 if [ -n "$local256" ] || [ -n "$SEND_256_COLORS_TO_REMOTE" ]; then
12
13 case "$TERM" in
14 'xterm') TERM=xterm-256color;;
15 'screen') TERM=screen-256color;;
16 'Eterm') TERM=Eterm-256color;;
17 esac
18 export TERM
19
20 if [ -n "$TERMCAP" ] && [ "$TERM" = "screen-256color" ]; then
21 TERMCAP=$(echo "$TERMCAP" | sed -e 's/Co#8/Co#256/g')
22 export TERMCAP
23 fi
24 fi
25
26 unset local256