#
# ALT Linux zshrc configuration file for zsh(1).
# This file is sourced in interactive mode only.
# For feature-rich sample zshrc, see /usr/share/doc/zsh-*/zshrc.
# Place custom options into ~/.zshrc.
#

# Load essential files first:
#	a) system profile
#	b) bash profile
emulate sh
[ -f /etc/profile ] && . /etc/profile
[ -f /etc/bashrc ] && . /etc/bashrc

# Now I'm zsh again.
# Load keyboard bindings.
emulate zsh
[ -f /etc/zlerc ] && zmodload zsh/zle && . /etc/zlerc

# 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
