# Chmouel Boudjnah <chmouel@mandrakesoft.com>
# Default zsh configuration if no .zshrc is provided.

# Set up aliases, this may confuse gurus but well after all gurus now
# how to remove alias.
alias mv='nocorrect mv -i'       # no spelling correction on mv
alias cp='nocorrect cp -i'       # no spelling correction on cp
alias rm='nocorrect rm -i'       # no spelling correction on rm
alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
alias d='ls'
alias s='cd ..'
alias p='cd -'

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

# Completion functions
_compdir=/usr/share/zsh/$ZSH_VERSION/functions/Completion
[[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_compdir)
autoload -U compinit
compinit

### Color completion. and menu selection
zmodload -i zsh/complist
export ZLS_COLORS=$LS_COLORS
export ZLS_COLOURS=$LS_COLORS
export LISTPROMPT=""

#Make it bash alike
WORDCHARS=''

## General alias examples
#  alias -g L="|less"
#  alias -g H="|head"
#  alias -g T="|tail"
#  alias -g G="|grep"
#  alias -g N="&>/dev/null&"
#  alias -g O="2>&1"

## Bindkey you may think it's usefull 
#  bindkey ' ' magic-space  # also do history expansino on space
#  bindkey -s "^xs" '\C-e"\C-asu -c "'
#  bindkey -s "^xd" "$(date '+-%d_%b')"
#  bindkey -s "^xf" "$(date '+-%D'|sed 's|/||g')"
#  bindkey -s "^xp" "\$(pwd\)/"
#  bindkey -s "^xw" "\C-a \$(which \C-e\)\C-a"