home *** CD-ROM | disk | FTP | other *** search
- #----------------------------------------------------------------------#
- # File: ~/.elven/es/main
- # Auth: North-Keys Thu Jul 22 04:39:44 CDT 1993
- # Desc: elven scripts primary file, es version
- #----------------------------------------------------------------------#
-
- fn echon args { echo -n $args }
- fn message args { if %interactive-p { echon $args } }
-
- message 'lvn/es/4 '
-
- if { ~ $LOGNAME } \
- {
- if { whatis logname >/dev/null >[2=1] } \
- { LOGNAME = `{logname} } \
- { echon 'Who are we?: ' ; LOGNAME = `{ head -1 } }
- }
- if { ~ $HOME } { HOME = ~$LOGNAME }
-
- ELVEN_PREV = $ELVEN ; ELVEN = $HOME/.elven
-
- fn self args \
- {
- if { ~ $args(1) - } { ENVIRON = () ; args = $args(2 ...) }
- if { ~ 0 $#args } { files = main } { files = ($args) }
- for (f = $files) \
- {
- if { test -r $ELVEN/$f } \
- { $&dot $ELVEN/$f } \
- { if { test -r $ELVEN/es/$f } { . $ELVEN/es/$f } false }
- }
- }
-
- if { { ! ~ $LOGNAME $ENVIRON } || { ! ~ $ELVEN_PREV $ELVEN } } { self environ }
-
- ELVEN_PREV = ()
-
- if { ~ $TERM '|'* } { GURU = `{ echo $TERM | cut -c2- } ; TERM = guru ; $GURU }
-
- if %interactive-p \
- {
- self traps # set signal traps
- self functions # get functions and aliases
- self interface # set interface
- self session # get per session settings
- echo .
- .
- }
-
- #----------eof