# extract the current branch from git repositories parse_git_branch() { git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } # enable command substitution in prompts setopt prompt_subst # Set prompt PS1=$'%(?..%{\e[01;31m%}%? )%{\e[01;32m%}%n@%m%{\e[01;34m%} %~%{\e[01;33m%}$(parse_git_branch) %{\e[00m%}%(!.#.$) ' # aliases alias q3defrag="/opt/quake3/ioquake3 +set fs_game defrag" alias uiae="setxkbmap de nodeadkeys" alias asdf="setxkbmap de neo" alias ASDF="setxkbmap de neo" alias aria2nw="urxvtc -e aria2c" alias matlab="MATLAB_JAVA=/usr/lib/jvm/icedtea6-bin/jre/ /opt/MATLAB/R2011a/bin/matlab" alias paste="curl -F 'content=@-' http://p.tkolb.de/p"