#
# ALT Linux zsh configuration file.
# This file is sourced in interactive mode only.
# For feature-rich sample zshrc, see /usr/share/doc/zsh-*/StartupFiles/.
#
umask 022

# Load essential files first:
#	a) system profile
#	b) bash profile
emulate sh
for f in /etc/profile /etc/bashrc; do
	if [ -f $f ]; then
		. $f
	fi
done

# Now I'm zsh again.
# load keyboard bindings.
emulate zsh
if [ -f /etc/zlerc ]; then
	. /etc/zlerc
fi

# Set prompts
PROMPT="%n@%m %3~ %(!.#.$) "    # default prompt

# Some environment variables
path=($path $HOME/bin)
export USER=$USERNAME
export HOSTNAME=$HOST

# history options
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=11111
export SAVEHIST=9999

# more history options; this makes history more convenient
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_REDUCE_BLANKS

# Completion functions
autoload -U compinit
compinit

# 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
