Hier meine fertige .zshrc. Habe dabei zusätzlich noch die grml-zsh-config installiert (aus dem ArchLinux Repository)
# autoload modules
autoload -U colors && colors
autoload -U compinit && compinit
autoload -U zsh-mime-setup
# the terminal
export TERM=rxvt
# prompt
export PS1="%{$bold_color%}[%{$fg[grey]%}%* %{$fg[green]%}%n@%m %{$reset_color%}%{$fg[blue]%}%c%{$reset_color%}%{$bold_color%}]%#%{$reset_color%} "
# options for zsh
setopt auto_pushd
setopt pushd_ignore_dups
setopt correct
setopt glob_complete
setopt rm_star_wait
setopt no_flow_control
setopt no_beep
setopt histignorespace
setopt auto_cd
# key bindings
#bindkey "\e[1~" beginning-of-line # Home
#bindkey "\e[4~" end-of-line # End
#bindkey "\e[5~" beginning-of-history # PageUp
#bindkey "\e[6~" end-of-history # PageDown
#bindkey "\e[2~" quoted-insert # Ins
#bindkey "\e[3~" delete-char # Del
#bindkey "\e[5C" forward-word
#bindkey "\eOc" emacs-forward-word
#bindkey "\e[5D" backward-word
#bindkey "\eOd" emacs-backward-word
#bindkey "\e\e[C" forward-word
#bindkey "\e\e[D" backward-word
#bindkey "\e[Z" reverse-menu-complete # Shift+Tab
case "$TERM" in
cons25*|linux) # plain BSD/Linux console
bindkey 'e[H' beginning-of-line # home
bindkey 'e[F' end-of-line # end
bindkey 'e[5~' delete-char # delete
bindkey '[D' emacs-backward-word # esc left
bindkey '[C' emacs-forward-word # esc right
;;
*rxvt*) # rxvt derivatives
bindkey 'e[3~' delete-char # delete
bindkey 'eOc' forward-word # ctrl right
bindkey 'eOd' backward-word # ctrl left
# workaround for screen + urxvt
bindkey 'e[7~' beginning-of-line # home
bindkey 'e[8~' end-of-line # end
bindkey '^[[1~' beginning-of-line # home
bindkey '^[[4~' end-of-line # end
;;
*xterm*) # xterm derivatives
bindkey 'e[H' beginning-of-line # home
bindkey 'e[F' end-of-line # end
bindkey 'e[3~' delete-char # delete
bindkey 'e[1;5C' forward-word # ctrl right
bindkey 'e[1;5D' backward-word # ctrl left
# workaround for screen + xterm
bindkey 'e[1~' beginning-of-line # home
bindkey 'e[4~' end-of-line # end
;;
screen)
bindkey '^[[1~' beginning-of-line # home
bindkey '^[[4~' end-of-line # end
bindkey 'e[3~' delete-char # delete
bindkey 'eOc' forward-word # ctrl right
bindkey 'eOd' backward-word # ctrl left
bindkey '^[[1;5C' forward-word # ctrl right
bindkey '^[[1;5D' backward-word # ctrl left
;;
esac
zsh-mime-setup
# aliases
alias l='ls -lAh --color'
alias g='grep -i --color'
alias lg='l | g'
alias gf='grep -nriH'
alias vg='grep -iv'
alias cd..='cd ..'
alias cdd='cd ~/Desktop'
alias p='pwd'
alias c='clear'
alias cc='cd ~; c; source .bashrc'
alias pacman='pacman-color'
alias install='yaourt -S'
alias search='yaourt -Ss'
alias update='yaourt -Suya'
alias edit='gedit'
alias tl='translate -l de-en -i'
alias keys='setxkbmap'
# uncompress depending on extension...
e() {
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.rar) unrar x "$1" ;;
*.gz) gunzip "$1" ;;
*.tar) tar xvf "$1" ;;
*.tbz2) tar xvjf "$1" ;;
*.tgz) tar xvzf "$1" ;;
*.zip) unzip "$1" ;;
*.Z) uncompress "$1" ;;
*.7z) 7z x "$1" ;;
*)
echo "'$1' cannot be extracted"
return 1
;;
esac
else
echo "'$1' is not a valid file"
return 1
fi
return 0
}
# the editor is vim
export EDITOR="/usr/bin/vim"
# midnight commander color config
export MC_COLOR_TABLE="$MC_COLOR_TABLE: editnormal=lightgray,black: editbold=yellow,black: editmarked=black,cyan"
# less config
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
# alt+s inserts sudo at the beginning of the line
insert_sudo () { zle beginning-of-line; zle -U "sudo " }
zle -N insert-sudo insert_sudo
bindkey "^[s" insert-sudo

