home *** CD-ROM | disk | FTP | other *** search
- #----------------------------------------------------------------------#
- # File: ~/.cshrc
- # Author: Christoph. Alex. North-Keys
- # Descrip: Foundation of the elven shell used by the author.
- #----------------------------------------------------------------------#
- alias echon 'echo -n \!*'
- if (X`echo -n` == X-n) alias echon 'echo \!*"\c"'
- if ($?prompt) then
- alias message 'echon \!*'
- else
- alias message 'echo \!* > /dev/null'
- endif
-
- message "lvn/csh/3 " # Tue Jul 6 05:21:40 CDT 1993
-
- # lines to recover a login name and home directory
- if !($?LOGNAME) then
- (logname) >& /dev/null
- if ($status) then
- echon 'Who are we?: '
- setenv LOGNAME "`head -1`"
- else
- setenv LOGNAME "`logname`"
- endif
- endif
- setenv HOME ~$LOGNAME ; set home = $HOME
- if !($?ENVIRON) setenv ENVIRON '' # set in environ
-
- set ELVEN_PREV = ""
- if ($?ELVEN) then
- set ELVEN_PREV = "$ELVEN"
- endif
- setenv ELVEN "$HOME/.elven"
-
- setenv SHELL "$shell"
- if (! $?SHLVL) setenv SHLVL -1
- if (! $?shlvl) then
- set shlvl = $SHLVL
- @ shlvl++
- setenv SHLVL $shlvl # Yields [0-?)
- endif
-
- # this emulates the single bash function, self ...
- alias selfind 'if (-f $ELVEN/\!:1) echo $ELVEN/\!:1; if (-f $ELVEN/csh/\!:1) echo $ELVEN/csh/\!:1 '
- alias selfif 'set _s=`selfind \!:1`; if ("X" != "X$_s" && -f "$_s") source $_s; unset _s'
- alias self 'set _f = cshrc ; if ( "X-" == "X\!*") setenv ENVIRON ""; if ( "X" != "X\!*" && "X-" != "X\!*" ) set _f = "\!*" ; selfif $_f ; unset _f'
-
- if (("$ENVIRON" != "$LOGNAME")||("$ELVEN_PREV" != "$ELVEN")) then
- self environ
- endif
- unset ELVEN_PREV
-
- if ($?prompt) then
- self aliases # get aliases
- self interface # set interface
- self session # get interactive additions
- echo '.'
- endif
- #----------End of file----------#
- # Local Variables: #
- # backup-by-copying-when-linked: t #
- # end: #
-