#
# my rc file for zsh 2.0
#
path=(~/scr ~/bin/$HOSTTYPE /usr/princeton/bin /usr/ucb /usr/bin /bin \
~maruchck/scr ~subbarao/bin ~maruchck/bin \
/usr/hosts /usr/princeton/bin/X11 /./usr/lang /./usr/etc /./etc \
~/src/zsh/bin ~presotto/bin)

cdpath=(~ ~/src/cs320 ~/src)

# search path for functions
fpath=(~/func)

# commonly used directory
csrc=/usr/princeton/common/src

unlimit
limit stack 8192

# turn on core dumps for the shell, but not child processes
limit -s
limit core 0

umask 022

alias a=alias
a '<<'=more
a -g 'GF'='| fgrep -f ~/.friends' G='| grep' M='| less' cex='/u/pup/centrex'
a -g cpz=cpirazzi gun=egsirer me=pfalstad mjm=maruchck paswd='<(ypcat passwd)'
a -g sub=subbarao 'suk*=sukthnkr' tike=teichbrg
a a.out=./a.out sendmail=/usr/lib/sendmail c=cp 0=vi 09='vi -t' 00=r
a d=dirs en='enscript -2rGh' fm='finger -m' grep=egrep h=history
a hide='ARGV0="$(randline ~/pub/strings)                     " '
a hinfo='host -t hinfo' j=jobs l='ls -AF' lock='lock -p -60000'
a lsd='ls -d */' m=make make=gmake main=./main man=woman mm=less more=less
a nrable='ls -AFltrd *(^R)' sz='ls -l | sort -n +3 | tail -20'
a sn='sed -n' nw='l -ltr | tail' pd=pushd pop=popd ps=sps
a rable='ls -AFltrd *(R)' rn='hide /usr/princeton/bin/rn.4.1'
a rtfm='ARGV0=rtfm man' strings='strings -' t=cat talk='hide talk'
a v=mv where='hostname; echo >/dev/null' k9='kill -9'
a find='noglob find' bindkey='noglob bindkey' dh='dirs -v'

cpz=~cpirazzi gun=~egsirer mjm=~maruchck sub=~subbarao 

# for csh junkies (including tset)
setenv() { export $1=$2 }

export MANPATH=/usr/man:/usr/princeton/man:/u/cad/man:/usr/lang/man

# if this is not an interactive shell, skip the rest of this script
if [[ ! -o interactive ]]
then
	return
fi

# suffixes to ignore for filename completion
fignore=(.o .pro .old .log)
zsh=~/src/zsh

# name some directories
: ~zsh ~csrc ~cpz ~gun ~mjm ~sub

# load the history
HISTFILE=~/.zhistory SAVEHIST=100 DIRSTACKSIZE=50

PROMPT='ZZ %l %U%T%u %S%m%s[%h] '
RPROMPT=' %~'
FCEDIT=vi
!" export MAILCALL='NEW MAIL! '
export NAME='Paul Falstad'
export ORGANIZATION='League For Fighting Chartered Accountancy'
export YOUSAID='In %C you wrote:'
export ATTRIBUTION='%f wrote:'
export SHELL=/u/pfalstad/bin/sun4/zsh
export RNINIT=/u/pfalstad/.rninit
a less='hide TERMCAP="$LESSTERM" /usr/princeton/bin/less'
autoload cx acx mere yu yp randline proto namedir
MAIL=/usr/spool/mail/pfalstad
MAILCHECK=30
HISTSIZE=600
setopt notify globdots correct pushdtohome cdablevars autolist \
	sunkeyboardhack correctall autocd recexact longlistjobs mailwarning \
	autoresume histignorespace histignoredups pushdsilent noclobber \
	autopushd

unsetopt bgnice

# watch for some friends
watch=($(cat ~/.friends))
WATCHFMT='%n %a %l from %m at %t.'
LOGCHECK=0

export LESS=-ainx3

# do some bindings
bindkey '^X^Z' universal-argument ' ' magic-space
bindkey '^X^A' vi-find-prev-char-skip
bindkey -s '^X^S' 'sub
'

# for losing NeXT keyboards
bindkey -s '\M-/' '\\'
bindkey -s '\M-=' '|'

