a.b /.zshrc

# History
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000

setopt hist_ignore_all_dups
setopt appendhistory 

# Completion & correction
autoload -U compinit
compinit
setopt correct

# Prompt
autoload -U colors
colors

if [[ $HOST != "eriks" ]]; then
	USERCOLOR="yellow"	#Remote hosts
elif [[ ${UID} = 0 ]] then
	USERCOLOR="red"		#Root
else
	USERCOLOR="green"	#Regular user
fi

PROMPT="%{$fg_bold[${USERCOLOR}]%}%c %#%{$fg_no_bold[default]%} "

# Vim key bidnings
bindkey -v

# Various aliases
alias ls="ls -h --color"	#Display everything in a readable way
alias du="du -h"
alias free="free -m"
alias eix="eix -Fc"

alias diff="diff -u"		#Standard diffs are pretty unusable

alias slrn="slrn; reset"	#slrn somehow messes up the terminal

alias last.fm-ripper="last.fm-ripper -n -u derab"
alias mplayer="mplayer -vf pp,scale -autoq 100"

alias s="su"
alias shellium="ssh aeebee@shellium.org"

# With -p, Paludis should have normal niceness
# Else, it should be extremly friendly
function paludis(){
	if echo $@ | egrep '\-.+p' > /dev/null; then
		/usr/bin/paludis $@
	else
		nice -n19 /usr/bin/paludis $@
	fi
}