#
# Generic .zshrc file for zsh 2.5
#
# .zshrc is sourced in interactive shells.  It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#

# search path for the cd command
cdpath=(. .. ~ ~/src)

# where to look for function definitions
fpath=(~/.zfunc)

# use hard limits, except for a smaller stack and no core dumps
unlimit
limit stack 8192
limit core 0
limit -s

umask 022

# set up aliases
alias mv='nocorrect mv'    # no spelling correction on mv
alias cp='nocorrect cp'    # no spelling correction on cp
alias j=jobs
alias pu=pushd
alias po=popd
alias d='dirs -v'
alias h=history
alias grep=egrep
alias ll='ls -l'
alias la='ls -a'
alias z=suspend

# shell functions
setenv() { export $1=$2 }  # csh compatibility

# bigger shell functions to autoload
autoload zed
autoload run-help

# global aliases
#alias -g 'GF'='| fgrep -f ~/.friends' G='| grep' M='| less' cex='/u/pup/centrex'

manpath=($X11HOME/man /usr/man /usr/lang/man /usr/local/man)
export MANPATH

# filename completion suffixes to ignore
fignore=(.o .c~ .old)

# hosts to use for completion
hosts=(`hostname` prep.ai.mit.edu wuarchive.wustl.edu gatekeeper.dec.com)

# set prompts
PROMPT='%m%# '    # default prompt
RPROMPT=' %~'     # prompt for right side of screen

# some environment variables
export MAIL=/usr/spool/mail/$USER
export MAILCALL='NEW MAIL! '
export YOUSAID='In %C you wrote:'
export ATTRIBUTION='%f wrote:'
export LESS=-cex3M
export HELPDIR=/usr/local/lib/zsh/help  # directory for run-help function to find docs

MAILCHECK=300
HISTSIZE=300
DIRSTACKSIZE=30

# set/unset  shell options
setopt   notify globdots correct pushdtohome cdablevars autolist
setopt   sunkeyboardhack correctall autocd recexact longlistjobs
setopt   autoresume histignoredups pushdsilent noclobber
setopt   autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice

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

unhash p

# some nice bindings
#bindkey '^X^Z' universal-argument ' ' magic-space
#bindkey '^X^A' vi-find-prev-char-skip
#bindkey '^Z' accept-and-hold
#bindkey -s '\M-/' \\\\
#bindkey -s '\M-=' \|

bindkey -e       # emacs key bindings
# bindkey -v       # vi key bindings
