aboutsummaryrefslogtreecommitdiffstats
path: root/256term.csh
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-10-17 19:56:43 +0100
committerColin Guthrie <colin@mageia.org>2013-10-18 09:35:39 +0100
commit9cec39ee7ef6a745c3a9b19d1ba6e89b09da43c3 (patch)
tree3a122662900195e7b14067a03cd5124358db9daf /256term.csh
parent423b437e3d29673dfad4051515506e6d711d20e6 (diff)
parent8f5a82934f801ec94847fc899d235a39df9967a7 (diff)
downloadinitscripts-user/colin/update-to-9-50.tar
initscripts-user/colin/update-to-9-50.tar.gz
initscripts-user/colin/update-to-9-50.tar.bz2
initscripts-user/colin/update-to-9-50.tar.xz
initscripts-user/colin/update-to-9-50.zip
Merge tag 'initscripts-9.50-1' into distro/mgauser/colin/update-to-9-50
Tag as initscripts-9.50-1 Conflicts: Makefile lang.csh lang.sh po/Makefile rc.d/init.d/network service sysconfig.txt sysconfig/init sysconfig/network-scripts/ifup sysconfig/network-scripts/ifup-eth sysconfig/network-scripts/ifup-ippp sysconfig/network-scripts/network-functions sysctl.conf systemd/fedora-storage-init
Diffstat (limited to '256term.csh')
-rw-r--r--256term.csh25
1 files changed, 25 insertions, 0 deletions
diff --git a/256term.csh b/256term.csh
new file mode 100644
index 00000000..c3825687
--- /dev/null
+++ b/256term.csh
@@ -0,0 +1,25 @@
+# Enable 256 color capabilities for appropriate terminals
+
+# Set this variable in your local shell config if you want remote
+# xterms connecting to this system, to be sent 256 colors.
+# This can be done in /etc/csh.cshrc, or in an earlier profile.d script.
+# 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