From 56560fd597f94dfe6fe5fa79648398ab29d05775 Mon Sep 17 00:00:00 2001 From: xero Date: Mon, 14 Jul 2014 13:23:05 -0400 Subject: updated repo to manage dotfiles via gnu stow, the symlink farm manager. happy birthday commit! :birthday: :sparkles: --- zsh-root/.zsh/functions/prompt_git_info | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 zsh-root/.zsh/functions/prompt_git_info (limited to 'zsh-root/.zsh/functions/prompt_git_info') diff --git a/zsh-root/.zsh/functions/prompt_git_info b/zsh-root/.zsh/functions/prompt_git_info new file mode 100644 index 0000000..d492ac8 --- /dev/null +++ b/zsh-root/.zsh/functions/prompt_git_info @@ -0,0 +1,21 @@ +if [ -n "$__CURRENT_GIT_BRANCH" ]; then + local s="%F{cyan}-[%F{white}" + s+="$__CURRENT_GIT_BRANCH" + case "$__CURRENT_GIT_BRANCH_STATUS" in + ahead) + s+="↑" + ;; + diverged) + s+="↕" + ;; + behind) + s+="↓" + ;; + esac + if [ -n "$__CURRENT_GIT_BRANCH_IS_DIRTY" ]; then + s+="⚡" + fi + s+="%F{cyan}]" + + printf "%s%s" $s +fi \ No newline at end of file -- cgit v1.2.1