Created
October 4, 2011 13:05
-
-
Save eiro/1261597 to your computer and use it in GitHub Desktop.
my zsh prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precmd () { | |
local gitwhere=$( stfu2 git symbolic-ref HEAD) | |
[[ -n $gitwhere ]] || gitwhere=$( stfu2 git describe) | |
[[ -n $gitwhere ]] && { | |
local modif=`git s|wc -l` | |
[[ $modif = 0 ]] && modif="" || modif="($modif files modified)" | |
gitwhere="[${gitwhere##*/}$modif]" | |
} | |
export PS1="[%T] %n@%M%b:%d $gitwhere"$'\n'"> " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment