Table of Contents

ZSH (a.k.a. Ze best SHell in ze world)

History timestamps

HISTFILE=~/.history
HISTSIZE=9999
SAVEHIST=9999

setopt extendedhistory

alias history='history -i -d 1'

Prompt

A nice colorfull prompt

autoload -U colors && colors
if [ $UID = 0 ]
then
        PS1="%{$terminfo[bold]$fg[red]%}%m %{$fg[blue]%}%2~ %{$reset_color%}%# "
else
        PS1="%{$terminfo[bold]$fg[green]%}%n@%m %{$fg[blue]%}%2~ %{$reset_color%}%# "
fi

Some notes on this:

Right prompt

ZSH doesn't only have a left prompt, it can also have a right one. for instance, to display the the return code of the last typed command, add this in your .zshrc:

RPROMPT='%?'

Window/Tab title

case $TERM in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome)
        precmd () {print -Pn "\e]0;%n@%m: %2~\a"}
        ;;
esac