#
#	.cshrc file in ids account on "main" DoC filesystem.
#

#
#	before the big moment...
#
if ! $?GROUP	setenv GROUP	cs1
if ($GROUP != cs1 && $GROUP != ise1 && $GROUP != jmc1)	setenv GROUP	cs1
setenv USER_WANTS_EDITOR	vi
setenv USER_WANTS_ALIASES	no

#
#	the big moment!
#
source /usr/local/etc/default.cshrc

#
#	...and after the big moment.
#
umask 022

unsetenv	PRINTER
setenv		VIEWER		less
setenv		LESS		'-M'
setenv		LESSHISTFILE	-

set   exercises		= /vol/labsrc/firstyear/Exercises
set   ise1_exercises	= /vol/labsrc/ise1/Exercises
set   late_submissions	= $SUBMISSIONS/late_submissions
		   #these are purely as a convenience in filename-completion!
set   history	= 500
set   ignoreeof
#
#	(The status checking stuff below is to cater for older versions of
#	 [t]csh, which don't understand the -f flag of set.)
#
set -f path	= ( $path $SUBMISSIONS/bin $SUBMISSIONS/bin/$OS/$ARCH $AUTOTEST/bin $AUTOTEST/bin/$OS/$ARCH ) >& /dev/null
if $status then
  set path	= ( $path $SUBMISSIONS/bin $SUBMISSIONS/bin/$OS/$ARCH $AUTOTEST/bin $AUTOTEST/bin/$OS/$ARCH )
endif

if $?tcsh then
  set prompt	= "%U\! $USER@$HOST%%%u "
  unalias cwdcmd
  uncomplete *
  unset autocorrect autolist correct fignore histdup listmax listmaxrows matchbeep nostat notify rmstar savehist
else
  set prompt	= "\! $USER@$HOST% "
endif

alias 68000clean	'(rm -f *.lis *.h68)'
alias a			'(alias | t)'
alias b			'od --format=c \!:* |& t'
alias cd		'cd \!:* ; echo "(Moved to `/bin/pwd`)"'
			  #note: `/bin/pwd` used since $cwd can be misleading
alias cdl		'cd \!:* ; l'
alias ci		ci -u
alias co		co -l
alias crushedlr		'crushedls -l \!:* |& t'
alias crushedlrs	'crushedls \!:* |& t'
alias f			finger
alias fuck		'echo "My sentiments entirely." ; echo \!:* > /dev/null'
alias ghc		'(setenv HOME / ; exec /bin/ghc \!:*)'
alias ghci		'(setenv HOME / ; exec /bin/ghci \!:*)'
alias gmkdir		'(umask 002 ; mkdir \!:*)'
alias h			history
alias hi		'echo "Hi." ; echo \!:* > /dev/null'
alias ht		'(history | t)'
alias info		'info \!:* |& t'
alias j			'jobs -l'
alias k			'(kinit $USER@IC.AC.UK)'
			  #note: "IC.AC.UK" is a case-sensitive Kerberos realm
alias l			'ls -F \!:*'
alias la		'ls -aF \!:*'
alias lal		'ls -laF \!:* |& t'
alias lalt		'ls -laFt \!:* |& t'
alias ll		'ls -lF \!:* |& t'
alias llr		'ls -lRF \!:* |& t'
alias lo		logout
alias lr		'ls -laRF \!:* |& t'
alias lrpacks		'listpacks -l \!:* |& t'
alias lrs		'ls -aRF \!:* |& t'
alias lrt		'ls -laRFt \!:* |& t'
alias ls		'ls --color=if-tty --time-style="+%b %e  %Y\\
%b %e %H:%M"'
 #note: this maze of nested quotes and escapes seems the simplest possible!
alias lt		'ls -F \!:* |& t'
###alias man		'man \!:* |& t'
alias num		nl --section-delimiter="" --body-numbering=a
alias p			'(ps afSuwwwwwwwwwwx | egrep "^USER|$USER")'
alias pa		'ps afSuwwwwwwwwwwx'
alias popdl		'popd \!:* ; l'
alias pushdl		'pushd \!:* ; l'
alias q			quota -v
alias rcscp-p		'cp -p \!:1 \!:2 ; cp -p RCS/\!:1,v RCS/\!:2,v'
alias rcsdiff		'rcsdiff \!:* |& t'
alias rcslist		'rcslist \!:* |& t'
alias rcsmv		'mv \!:1 \!:2 ; mv RCS/\!:1,v RCS/\!:2,v'
alias rd		rcsdiff
alias restart		kill -CONT
alias restartall	'killall --user=$USER -CONT \!:*'
alias rlog		'rlog \!:* |& t'
alias rs		'set noglob ; eval `resize`'
alias rt		'rcat \!:* |& t'
alias sha128sum		'sha256sum \!:* | colrm 33 64'
alias stopall		'killall --user=$USER -STOP \!:*'
alias t			$VIEWER
alias up		'cdl ..'
