From 9a0f402caa2dd711d9f24ee9e28e90682d904795 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 3 Jan 2013 14:20:07 -0500 Subject: Rename term256 to 256term (glob sort) (#849429) --- 256term.csh | 25 +++++++++++++++++++++++++ 256term.sh | 26 ++++++++++++++++++++++++++ Makefile | 2 +- term256.csh | 25 ------------------------- term256.sh | 26 -------------------------- 5 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 256term.csh create mode 100644 256term.sh delete mode 100644 term256.csh delete mode 100644 term256.sh diff --git a/256term.csh b/256term.csh new file mode 100644 index 00000000..91547d0f --- /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 diff --git a/256term.sh b/256term.sh new file mode 100644 index 00000000..546f67bc --- /dev/null +++ b/256term.sh @@ -0,0 +1,26 @@ +# Enable 256 color capabilities for appropriate terminals + +# Set this variable in your local shell config (such as ~/.bashrc) +# if you want remote xterms connecting to this system, to be sent 256 colors. +# This must be set before reading global initialization such as /etc/bashrc. +# SEND_256_COLORS_TO_REMOTE=1 + +# Terminals with any of the following set, support 256 colors (and are local) +local256="$COLORTERM$XTERM_VERSION$ROXTERM_ID$KONSOLE_DBUS_SESSION" + +if [ -n "$local256" ] || [ -n "$SEND_256_COLORS_TO_REMOTE" ]; then + + case "$TERM" in + 'xterm') TERM=xterm-256color;; + 'screen') TERM=screen-256color;; + 'Eterm') TERM=Eterm-256color;; + esac + export TERM + + if [ -n "$TERMCAP" ] && [ "$TERM" = "screen-256color" ]; then + TERMCAP=$(echo "$TERMCAP" | sed -e 's/Co#8/Co#256/g') + export TERMCAP + fi +fi + +unset local256 diff --git a/Makefile b/Makefile index c6fc7a0a..ea16f2b8 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ install: install -m644 rwtab statetab networks $(ROOT)/etc install -m755 service $(ROOT)/sbin install -m644 lang.csh lang.sh $(ROOT)/etc/profile.d - install -m644 term256.csh term256.sh $(ROOT)/etc/profile.d + install -m644 256term.csh 256term.sh $(ROOT)/etc/profile.d install -m644 debug.csh debug.sh $(ROOT)/etc/profile.d install -m755 sys-unconfig $(ROOT)/usr/sbin install -m644 service.8 sys-unconfig.8 $(ROOT)$(mandir)/man8 diff --git a/term256.csh b/term256.csh deleted file mode 100644 index 91547d0f..00000000 --- a/term256.csh +++ /dev/null @@ -1,25 +0,0 @@ -# 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 diff --git a/term256.sh b/term256.sh deleted file mode 100644 index 546f67bc..00000000 --- a/term256.sh +++ /dev/null @@ -1,26 +0,0 @@ -# Enable 256 color capabilities for appropriate terminals - -# Set this variable in your local shell config (such as ~/.bashrc) -# if you want remote xterms connecting to this system, to be sent 256 colors. -# This must be set before reading global initialization such as /etc/bashrc. -# SEND_256_COLORS_TO_REMOTE=1 - -# Terminals with any of the following set, support 256 colors (and are local) -local256="$COLORTERM$XTERM_VERSION$ROXTERM_ID$KONSOLE_DBUS_SESSION" - -if [ -n "$local256" ] || [ -n "$SEND_256_COLORS_TO_REMOTE" ]; then - - case "$TERM" in - 'xterm') TERM=xterm-256color;; - 'screen') TERM=screen-256color;; - 'Eterm') TERM=Eterm-256color;; - esac - export TERM - - if [ -n "$TERMCAP" ] && [ "$TERM" = "screen-256color" ]; then - TERMCAP=$(echo "$TERMCAP" | sed -e 's/Co#8/Co#256/g') - export TERMCAP - fi -fi - -unset local256 -- cgit v1.2.1