From 0c6b80c2fe660f6b789c1d95828bf761e460c1f3 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Wed, 29 Jan 2014 11:30:12 -0500 Subject: [PATCH 1/8] Added a banner for core tcshrc. --- tcshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tcshrc b/tcshrc index 0a07f11..892b4e4 100644 --- a/tcshrc +++ b/tcshrc @@ -1,4 +1,8 @@ -# CSHRC Debugging tests +######################################### +# CSHENV Environment, core loading file # +######################################### + +# CSHENV Debugging tests if( ( $?CSHENV_DEBUG ) || ( $?CSHENV_VERBOSE_STARTUP ) ) then echo "Currently running tcshrc script" endif From 62d27bf9674a7865913c8f0eabd8f43fe18026b5 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 31 Jan 2014 11:19:23 -0500 Subject: [PATCH 2/8] Added original path check/sourcing. Seems to not work. :-/ Requires tcshrc resource alias to change to startup hooks. --- startup_hooks/tcshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/startup_hooks/tcshrc b/startup_hooks/tcshrc index 4f3925c..03656bc 100644 --- a/startup_hooks/tcshrc +++ b/startup_hooks/tcshrc @@ -39,6 +39,15 @@ if( -c `tty` ) then if( $?CSHENV_DEBUG ) then echo "Going to source core tcshrc..." endif + + # Capture the original path, so that we don't + # keep infinitely expanding it. + if( $?CSHENV_ORIGINAL_PATH ) then + setenv PATH ${CSHENV_ORIGINAL_PATH} + else + setenv CSHENV_ORIGINAL_PATH ${PATH} + endif + source ${CSHENV_DIR}/tcshrc endif From 4836b9411c039d4e2c51bdd87b09b04757428b2d Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 31 Jan 2014 11:23:40 -0500 Subject: [PATCH 3/8] Resource alias changed to go to startup hooks --- tcshrc.aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcshrc.aliases b/tcshrc.aliases index 4ecf71f..7a11a71 100644 --- a/tcshrc.aliases +++ b/tcshrc.aliases @@ -1,6 +1,6 @@ # CSHENV Aliases: -alias resource source ${CSHENV_DIR}/tcshrc +alias resource source ${CSHENV_DIR}/startup_hooks/tcshrc alias relog resource alias rl relog From 1c7ba97e8e387485f40562f9007ae365d3248eb0 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 2 Feb 2014 01:49:16 -0500 Subject: [PATCH 4/8] TCSH feature enabling variables now set. --- tcshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tcshrc b/tcshrc index 892b4e4..e9e8081 100644 --- a/tcshrc +++ b/tcshrc @@ -36,6 +36,12 @@ endif set cur_feature=$tcsh_features:e +# TCSH Extended features configuration +set color +set noding +set padhour + + if( $?CSHENV_DEBUG ) then echo "Tcsh Featureset probed..." endif @@ -82,7 +88,6 @@ endif #For FreeBSD's ls(1), and derived utilities {Like MacOS X/Darwin's ls(1)} setenv LSCOLORS 'ExFxcxdxbxegedabagacEB' setenv CLICOLOR_FORCE -set color if( $?CSHENV_DEBUG ) then echo "Trying to source tcshrc.${CSHENV_SYSTEM}" From dede1254baa826181c57f099164b4d3ebb728f8e Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 2 Feb 2014 01:51:53 -0500 Subject: [PATCH 5/8] Changed comments from tcsh to TCSH. --- tcshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcshrc b/tcshrc index e9e8081..c351304 100644 --- a/tcshrc +++ b/tcshrc @@ -30,7 +30,7 @@ if( $?tcsh ) then else # As we develop support for C++sh, we'll need this if( !$?cxxsh ) then - echo "What! We're not even in tcsh or something compatible, like C++sh!!!" + echo "What! We're not even in TCSH or something compatible, like C++sh!!!" endif endif @@ -43,7 +43,7 @@ set padhour if( $?CSHENV_DEBUG ) then - echo "Tcsh Featureset probed..." + echo "TCSH Featureset probed..." endif @@ -59,7 +59,7 @@ source \!:1 \\ endif"' if( $?CSHENV_DEBUG ) then - echo "Tcsh safe-source alias constructed..." + echo "TCSH safe-source alias constructed..." endif From faf57386a8a678162106bf480b4c35b508488fcd Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 2 Feb 2014 16:55:23 -0500 Subject: [PATCH 6/8] Corrected cache-dir creation variable. I didn't test the script on a virgin system, until I did it on a new cygwin system. Now I have discovered this, and I have fixed it to properly create the cache dir again. --- tcshrc.prompt.defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcshrc.prompt.defs b/tcshrc.prompt.defs index 434edb3..bf1dc93 100644 --- a/tcshrc.prompt.defs +++ b/tcshrc.prompt.defs @@ -85,7 +85,7 @@ set n="1" if ( ! -d $CSHENV_CACHE_DIR ) then - mkdir $CSHENVTCSH_CACHE_DIR + mkdir $CSHENV_CACHE_DIR endif #echo $screen_offset_count if ( -f ${CSHENV_CACHE_DIR}/screen.$screen_width ) then From 9d9a22df7bbf47d590103859b6145674a8bf048a Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 2 Feb 2014 16:58:31 -0500 Subject: [PATCH 7/8] LS detection variable should be for CSHENV_SYSTEM --- tcshrc.aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcshrc.aliases b/tcshrc.aliases index 7a11a71..5f8df19 100644 --- a/tcshrc.aliases +++ b/tcshrc.aliases @@ -28,7 +28,7 @@ if( $?CSHENV_USE_GNU_LS ) then setenv CSHENV_SYSTEM_LS Linux else - setenv CSHENV_SYSTEM_LS $SYSTEM + setenv CSHENV_SYSTEM_LS $CSHENV_SYSTEM endif if( $?CSHENV_DEBUG ) then echo "Done with gls probe..." From a888047293cef482d7fa59e022824856aa17d281 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 2 Feb 2014 17:23:12 -0500 Subject: [PATCH 8/8] New c vim syntax file. --- vim/after/syntax/c.vim | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 vim/after/syntax/c.vim diff --git a/vim/after/syntax/c.vim b/vim/after/syntax/c.vim new file mode 100644 index 0000000..87791fb --- /dev/null +++ b/vim/after/syntax/c.vim @@ -0,0 +1,23 @@ +" ADAM C vim syntax after extensions + +syn match cNamedConstant "\<[A-Z_][A-Z_0-9]*\>" +syn match cDebug "\" +syn keyword cDebug SKIP DOIT + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_c_syn_inits") + if version < 508 + let did_c_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink cNamedConstant NamedConstant + HiLink cDebug Debug + + delcommand HiLink +endif +