#
# Which shell do I use ?
#

export SHELL=`which zsh`

#
#  Sanity of my TTY
#

[[ -t 0 ]] && /bin/stty erase  "^H" intr  "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U"  >& /dev/null

#
#  Basic setup
#

# My prompt
source ~/.prompt

# The internal news server
export NNTPSERVER=news

# CVS
export CVSEDITOR='emacs'
export CVS_RSH='ssh2222'
export CVSROOT=localhost:/cvsroot/

# My watch format (logcheck is the time, in seconds, between checks)
LOGCHECK=60
WATCHFMT="%n has %a %l from %M"
WATCH=notme,root

# My reader
READNULLCMD=less

# History configuration
HISTSIZE=200
HISTFILE=~/.zshhistory
SAVEHIST=200

# Shell options
source ~/.zshoption


#
#  Aliases and functions
#

# Aliases
source ~/.alias

#
#  bindkeys and completion setup
#

bindkey "[A" history-search-backward
bindkey "[B" history-search-forward
bindkey "[3;5~" delete-word
bindkey "[5C" forward-word
bindkey "[5D" backward-word
bindkey "^[[3~" delete-char
bindkey "^[[F" end-of-line
bindkey "^[[H" beginning-of-line
# bindkey m menu-select
bindkey "[4~" end-of-line
bindkey "[1~" beginning-of-line
bindkey "^[^[[C" forward-word
bindkey "^[^[[D" backward-word

# Autoload zsh functions
# zed, THE editor
autoload zed

# zfinit, initialize zftp
autoload zfinit

# Autoload, define the user widget and bind incremental-... on TAB.
autoload incremental-complete-word
# zle -N incremental-complete-word
# bindkey i incremental-complete-word

# Module for listing completed words with colors and all
# zmodload zsh/complist

# Compinit
autoload -U compinit
compinit -i ${HOME}/.zcompdump

# Nslookup, for the network. Deprecated, but I still use it.
autoload nslookup

# zmv. THE real useful mv.
autoload zmv

# zftp. I like it, from time to time.
# zmodload zsh/zftp
autoload -U zfanon zfautocheck zfcd zfcd_match zfcget zfclose zfcput zfdir zffcache zfgcp zfget zfget_match zfgoto zfhere zfinit zfls zfmark zfopen zfparams zfpcp zfput zfrglob zfrtime zfsession zfstat zftp_chpwd zftp_progress zftransfer zftype zfuget zfuput


#
#  :completion:<func>:<completer>:<command>:<argument>:<tag>
# 
 zstyle ':completion:*' format '[32m-=> [01m%d[0m'
 zstyle ':completion:*' auto-description 'specify: %d'
 zstyle ':completion:*' completer _complete _correct _approximate
 zstyle ':completion:*' group-name ''
 zstyle ':completion:*' insert-unambiguous true
 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
 zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=** r:|=**'
 zstyle ':completion:*' max-errors 1
 zstyle ':completion:*' menu select=5
 zstyle ':completion:*' original true
 zstyle ':completion:*' squeeze-slashes true
 zstyle ':completion:*:processes' list-colors '=(#b)(?????)(#B)?????????????????????????????????([^ ]#/)#(#b)([^ /]#)*=00=01;31=01;33'
 zstyle ':*:hosts' guiscar elijah aurora daneel robbie solaria gaia warp.epitanim nostromo.lrde accord bam blaster dune fel ford ix luke megabobo megadodo murbella naib obliterator orni sietch spice spock teg tie usul


#
# Other environment variables
#
source ~/.zshenv

alias emacs="emacs -fn '-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard'"

