Annotation of home/as/.csh/_load.csh, revision 1.1
1.1 ! as 1: # $Paefchen$
! 2:
! 3: umask 22
! 4:
! 5: alias whan 'if ($?CSHRC_DEBUG && $?prompt) echo CSHRC: \!:1'
! 6: alias aliass 'if ( -f \!:2 ) alias \!:1 source "\!:2"'
! 7: alias cshrc_md_opt 'grep -Eo "^# ?CSHRC_\!:2:au\: ?.+" < \!:1 | tail -1 | sed -E "s/^# ?CSHRC_\!:2:au\: ?(.*)/\1/"'
! 8:
! 9: alias append_path 'if ( $\!:1 !~ \!:2\:* && $\!:1 !~ *\:\!:2\:* && $\!:1 !~ *\:\!:2 && $\!:1 !~ \!:2 ) setenv \!:1 ${\!:1}\:\!:2'
! 10: # add to front of path
! 11: alias prepend_path 'if ( $\!:1 !~ \!:2\:* && $\!:1 !~ *\:\!:2\:* && $\!:1 !~ *\:\!:2 && $\!:1 !~ \!:2 ) setenv \!:1 \!:2\:${\!:1}; if ( $\!:1 !~ \!:2\:* ) setenv \!:1 \!:2`echo \:${\!:1} | /usr/bin/sed -e s%^\!:2\:%% -e s%:\!:2\:%:%g -e s%:\!:2\$%%`'
! 12:
! 13: switch ($OSTYPE:al)
! 14: case darwin:
! 15: alias cp_remote_file 'curl \!:1 > \!:2'
! 16: breaksw
! 17: case freebsd:
! 18: alias cp_remote_file 'fetch -o \!:2 \!:1'
! 19: alias rcdgetconfigarg ~/.csh/rcdgetconfigarg.sh
! 20: breaksw
! 21: default:
! 22: alias cp_remote_file 'fetch -o \!:2 \!:1'
! 23: endsw
! 24:
! 25: if (! $?CSHRC_MD) set CSHRC_MD
! 26:
! 27: foreach _md ($CSHRC_MD)
! 28: set _load_v = "CSHRC_MD_""$_md:au""_LAODED"
! 29:
! 30: if (`eval 'if ($'"?$_load_v) echo 1"` == 1) continue
! 31:
! 32: set _file = "${HOME}/.csh/${_md}.csh"
! 33:
! 34: if (! -f "$_file") then
! 35: whan "Fehler: '$_md' konnte nicht gefunden werden."
! 36: continue
! 37: endif
! 38:
! 39: if (! $?tcsh && `cshrc_md_opt $_file tcshonly` == "YES" ) continue
! 40: if (! $?prompt && `cshrc_md_opt $_file promptonly` == "YES") continue
! 41:
! 42: set _osonly = `cshrc_md_opt "$_file" osonly`
! 43: if ("$_osonly" != "") then
! 44: set _status = 0
! 45: foreach _os ($_osonly:al)
! 46: if ($_os == $OSTYPE:al) set _status = 1
! 47: end
! 48: if ($_status == 0) continue
! 49: endif
! 50:
! 51: whan "'$_md' wird geladen"
! 52: source "$_file"
! 53: eval set "$_load_v"
! 54: end
! 55:
! 56: unset _md _file _status _load_v