Skip to content

Instantly share code, notes, and snippets.

@yuuan
yuuan / git-rprompt.zsh
Last active October 8, 2015 03:58 — forked from uasi/gist:214109
zsh/pcre version.
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
setopt re_match_pcre
function rprompt-git-current-branch {
@yuuan
yuuan / git-rprompt.zsh
Last active February 24, 2016 14:59 — forked from uasi/gist:214109
Non zsh/pcre version.
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
function rprompt-git-current-branch {
local name st color gitdir action