aboutsummaryrefslogtreecommitdiffstats
path: root/term256.csh
diff options
context:
space:
mode:
Diffstat (limited to 'term256.csh')
-rw-r--r--term256.csh27
1 files changed, 27 insertions, 0 deletions
diff --git a/term256.csh b/term256.csh
new file mode 100644
index 00000000..1197512c
--- /dev/null
+++ b/term256.csh
@@ -0,0 +1,27 @@
+# Enable 256 color capabilities for appropriate terminals
+
+# Uncomment this if you want remote xterms connecting
+# to this system, to be sent 256 colors. Note that
+# local xterms, ssh'ing to localhost are considered
+# remote in this context, but in that case, $TERM should
+# have already been set to 256 color capable.
+# SEND_256_COLORS_TO_REMOTE=1
+
+# Terminals with any of the following set, support 256 colors (and are local)
+set local256="$?COLORTERM$?XTERM_VERSION$?ROXTERM_ID$?KONSOLE_DBUS_SESSION"
+
+if ($?TERM && ($local256 || $?SEND_256_COLORS_TO_REMOTE)) then
+
+ switch ($TERM)
+ case 'xterm':
+ case 'screen':
+ case 'Eterm':
+ setenv TERM "$TERM-256color"
+ endsw
+
+ if ($?TERMCAP && ($TERM == "screen-256color")) then
+ setenv TERMCAP `echo "$TERMCAP" | sed -e 's/Co#8/Co#256/g'`
+ endif
+endif
+
+unset local256