From 1279c2a7ba0fa3ed5a3a9059bcbaf0d887022c46 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 26 Jan 2014 16:03:42 -0500 Subject: [PATCH] Altered startup to now ignore login. Relog and ls aliases also added. --- startup_hooks/login | 15 +--------- startup_hooks/tcshrc | 68 +++++++++++++++++++++++++++----------------- tcshrc.aliases | 8 ++++++ 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/startup_hooks/login b/startup_hooks/login index 953be43..a524ebf 100644 --- a/startup_hooks/login +++ b/startup_hooks/login @@ -5,14 +5,6 @@ if( ! $?CSHENV_LOGIN_SOURCED ) then echo "Starting login..." endif - if( ! $?CSHENV_DIR ) then - setenv CSHENV_DIR ~/cshenv - endif - - if( $?CSHENV_DEBUG ) then - echo "Set CSHENV_DIR to: " ${CSHENV_DIR} - endif - #echo "Under: " $_ #echo "Zero: " $0 @@ -28,17 +20,12 @@ if( ! $?CSHENV_LOGIN_SOURCED ) then #echo login hook lives at: ${CSHENV_LOGIN_PATH} - setenv LC_NUMERIC en_US.UTF-8 - setenv LC_MEASUREMENT en_US.UTF-8 - setenv LC_MONETARY en_US.UTF-8 - setenv LC_TIME en_US.UTF-8 - if( $?CSHENV_DEBUG ) then echo "Ending login..." endif # Chain off to tcshrc, afterwards, if login hasn't been sourced - source ${CSHENV_DIR}/startup_hooks/tcshrc + # source ${CSHENV_DIR}/startup_hooks/tcshrc endif diff --git a/startup_hooks/tcshrc b/startup_hooks/tcshrc index aa41a71..4f3925c 100644 --- a/startup_hooks/tcshrc +++ b/startup_hooks/tcshrc @@ -1,35 +1,51 @@ -# Only take this file in, if LOGIN is sourced. LOGIN will be sourced -# first, therefore, and will chain off to this. -if( $?CSHENV_LOGIN_SOURCED && ! $?CSHENV_TCSHRC_SOURCED ) then +# This file will always be taken in. .login is now +# vestigial, and doesn't matter if first or second. - set CSHENV_TCSHRC_SOURCED +# These are the bits that would be in login: +if( ! $?CSHENV_DIR ) then + setenv CSHENV_DIR ~/cshenv +endif + +if( $?CSHENV_DEBUG ) then + echo "Set CSHENV_DIR to: " ${CSHENV_DIR} +endif + +setenv LC_NUMERIC en_US.UTF-8 +setenv LC_MEASUREMENT en_US.UTF-8 +setenv LC_MONETARY en_US.UTF-8 +setenv LC_TIME en_US.UTF-8 + + +# These are the bits that are in tcshrc + +set CSHENV_TCSHRC_SOURCED + +if( $?CSHENV_DEBUG ) then + echo "Starting tcshrc..." +endif + +#if( -z ${_} ) then + #echo $0 + #setenv CSHENV_TCSHRC_PATH $0 +#else + #echo ${_} + #setenv CSHENV_TCSHRC_PATH "${_}" +#endif + +#echo tcshrc hook lives at: ${CSHENV_TCSHRC_PATH} + +if( -c `tty` ) then if( $?CSHENV_DEBUG ) then - echo "Starting tcshrc..." + echo "Going to source core tcshrc..." endif + source ${CSHENV_DIR}/tcshrc +endif - #if( -z ${_} ) then - #echo $0 - #setenv CSHENV_TCSHRC_PATH $0 - #else - #echo ${_} - #setenv CSHENV_TCSHRC_PATH "${_}" - #endif +# Not using tcshrc bits for non-login shells. Will decide what to do later. - #echo tcshrc hook lives at: ${CSHENV_TCSHRC_PATH} - - if( -c `tty` ) then - if( $?CSHENV_DEBUG ) then - echo "Going to source core tcshrc..." - endif - source ${CSHENV_DIR}/tcshrc - endif - - # Not using tcshrc bits for non-login shells. Will decide what to do later. - - if( $?CSHENV_DEBUG ) then - echo "Ending tcshrc..." - endif +if( $?CSHENV_DEBUG ) then + echo "Ending tcshrc..." endif ########################### diff --git a/tcshrc.aliases b/tcshrc.aliases index d87fdb5..de4c248 100644 --- a/tcshrc.aliases +++ b/tcshrc.aliases @@ -1,3 +1,9 @@ +# CSHENV Aliases: + +alias resource source ${CSHENV_DIR}/tcshrc +alias relog resource +alias rl relog + #Classic UNIXy aliases #Dir motion @@ -5,6 +11,8 @@ alias pd pushd alias pu pushd alias po popd +alias l ls + #Standard ls aliases that I use: alias ll l -l alias la l -a