From b6bb14164996f3eb42044247110e673325c29699 Mon Sep 17 00:00:00 2001 From: Jared Hancock Date: Thu, 7 Apr 2011 22:59:01 -0500 Subject: [PATCH] Use a vcs library and add a Mercurial plugin Move git_* functions to vcs_* to allow for better plugin support Modify plugins to use the new function names and declare new variable names, so ZSH_THEME_GIT_* variables are ZSH_THEME_VCS_* and git_prompt_info() is vcs_prompt_info() --- lib/git.zsh | 32 ++++++++++++------- oh-my-zsh.sh | 1 + themes/Soliah.zsh-theme | 10 +++--- themes/afowler.zsh-theme | 6 ++-- themes/arrow.zsh-theme | 10 +++--- themes/aussiegeek.zsh-theme | 10 +++--- themes/awesomepanda.zsh-theme | 12 +++---- themes/bira.zsh-theme | 6 ++-- themes/candy.zsh-theme | 10 +++--- themes/clean.zsh-theme | 10 +++--- themes/cloud.zsh-theme | 10 +++--- themes/dallas.zsh-theme | 10 +++--- themes/darkblood.zsh-theme | 8 ++--- themes/daveverwer.zsh-theme | 6 ++-- themes/dieter.zsh-theme | 10 +++--- themes/dst.zsh-theme | 10 +++--- themes/dstufft.zsh-theme | 12 +++---- themes/eastwood.zsh-theme | 10 +++--- themes/edvardm.zsh-theme | 10 +++--- themes/evan.zsh-theme | 2 +- themes/example.zsh-theme | 2 +- themes/fishy.zsh-theme | 6 ++-- themes/flazz.zsh-theme | 6 ++-- themes/fletcherm.zsh-theme | 10 +++--- themes/funky.zsh-theme | 2 +- themes/gallifrey.zsh-theme | 6 ++-- themes/garyblessington.zsh-theme | 10 +++--- themes/gentoo.zsh-theme | 6 ++-- themes/geoffgarside.zsh-theme | 8 ++--- themes/gozilla.zsh-theme | 24 +++++++------- themes/imajes.zsh-theme | 2 +- themes/jbergantine.zsh-theme | 10 +++--- themes/josh.zsh-theme | 10 +++--- themes/jreese.zsh-theme | 10 +++--- themes/kardan.zsh-theme | 8 ++--- themes/kennethreitz.zsh-theme | 10 +++--- themes/lambda.zsh-theme | 6 ++-- themes/lukerandall.zsh-theme | 6 ++-- themes/macovsky-ruby.zsh-theme | 6 ++-- themes/macovsky.zsh-theme | 6 ++-- themes/maran.zsh-theme | 6 ++-- themes/mgutz.zsh-theme | 10 +++--- themes/mikeh.zsh-theme | 2 +- themes/mrtazz.zsh-theme | 10 +++--- themes/nanotech.zsh-theme | 10 +++--- themes/philips.zsh-theme | 10 +++--- themes/pmcgee.zsh-theme | 10 +++--- themes/rgm.zsh-theme | 10 +++--- themes/risto.zsh-theme | 6 ++-- themes/rixius.zsh-theme | 10 +++--- themes/robbyrussell.zsh-theme | 10 +++--- themes/skaro.zsh-theme | 10 +++--- themes/sorin.zsh-theme | 48 ++++++++++++++-------------- themes/sporty_256.zsh-theme | 10 +++--- themes/takashiyoshida.zsh-theme | 10 +++--- themes/theunraveler.zsh-theme | 22 ++++++------- themes/thomasjbradley.zsh-theme | 12 +++---- themes/tjkirch.zsh-theme | 10 +++--- themes/tonotdo.zsh-theme | 12 +++---- themes/wezm+.zsh-theme | 10 +++--- themes/wezm.zsh-theme | 10 +++--- themes/xiong-chiamiov-plus.zsh-theme | 2 +- 62 files changed, 304 insertions(+), 295 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 8512de8a4..7b212d2aa 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -1,14 +1,22 @@ # get the name of the branch we are on + +VCS+="git" + +function git_check() { + git status -s > /dev/null 2>&1 + return $? +} + function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return - echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "${(e)ZSH_THEME_VCS_PROMPT_PREFIX}${ref#refs/heads/}$(parse_git_dirty)${ZSH_THEME_VCS_PROMPT_SUFFIX}" } parse_git_dirty () { if [[ -n $(git status -s 2> /dev/null) ]]; then - echo "$ZSH_THEME_GIT_PROMPT_DIRTY" + echo "$ZSH_THEME_VCS_PROMPT_DIRTY" else - echo "$ZSH_THEME_GIT_PROMPT_CLEAN" + echo "$ZSH_THEME_VCS_PROMPT_CLEAN" fi } @@ -17,28 +25,28 @@ git_prompt_status() { INDEX=$(git status --porcelain 2> /dev/null) STATUS="" if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_UNTRACKED$STATUS" fi if $(echo "$INDEX" | grep '^A ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_ADDED$STATUS" elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_ADDED$STATUS" fi if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_MODIFIED$STATUS" elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_MODIFIED$STATUS" elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_MODIFIED$STATUS" fi if $(echo "$INDEX" | grep '^R ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_RENAMED$STATUS" fi if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_DELETED$STATUS" fi if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" + STATUS="$ZSH_THEME_VCS_PROMPT_UNMERGED$STATUS" fi echo $STATUS } diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 291772dfe..7a2ef975b 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -5,6 +5,7 @@ fpath=($ZSH/functions $fpath) # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore +VCS=() for config_file ($ZSH/lib/*.zsh) source $config_file # Load all of your custom configurations from custom/ diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme index 1c0ab3cc9..27a85932e 100644 --- a/themes/Soliah.zsh-theme +++ b/themes/Soliah.zsh-theme @@ -1,14 +1,14 @@ -PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) +PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(vcs_prompt_info) $ ' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[white]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%})" # Text to display if the branch is dirty -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" # Text to display if the branch is clean -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_CLEAN="" # Colors vary depending on time lapsed. ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}" diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme index 3a4753fc1..cc5ab98c8 100644 --- a/themes/afowler.zsh-theme +++ b/themes/afowler.zsh-theme @@ -2,9 +2,9 @@ if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' +PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(vcs_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index d62dcdcb9..60478feb0 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -1,12 +1,12 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' -RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' +RPROMPT='%{$fg[$NCOLOR]%}%p $(vcs_prompt_info)%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="git:" -ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_DIRTY="*" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)' +ZSH_THEME_VCS_PROMPT_SUFFIX="" +ZSH_THEME_VCS_PROMPT_DIRTY="*" +ZSH_THEME_VCS_PROMPT_CLEAN="" # See http://geoff.greer.fm/lscolors/ export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx" diff --git a/themes/aussiegeek.zsh-theme b/themes/aussiegeek.zsh-theme index c2c7f65b9..ba974e301 100644 --- a/themes/aussiegeek.zsh-theme +++ b/themes/aussiegeek.zsh-theme @@ -1,8 +1,8 @@ -PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color +PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(vcs_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color $ ' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green](" -ZSH_THEME_GIT_PROMPT_SUFFIX=")" -ZSH_THEME_GIT_PROMPT_CLEAN="✔" -ZSH_THEME_GIT_PROMPT_DIRTY="✗" +ZSH_THEME_VCS_PROMPT_PREFIX="$fg_bold[green](" +ZSH_THEME_VCS_PROMPT_SUFFIX=")" +ZSH_THEME_VCS_PROMPT_CLEAN="✔" +ZSH_THEME_VCS_PROMPT_DIRTY="✗" diff --git a/themes/awesomepanda.zsh-theme b/themes/awesomepanda.zsh-theme index 411b89837..ea927991e 100644 --- a/themes/awesomepanda.zsh-theme +++ b/themes/awesomepanda.zsh-theme @@ -1,11 +1,11 @@ # the svn plugin has to be activated for this to work. -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(vcs_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) " +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)'"(%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%}) " @@ -15,4 +15,4 @@ ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}" ZSH_THEME_SVN_PROMPT_PREFIX="svn:(" ZSH_THEME_SVN_PROMPT_SUFFIX=")" ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}" -ZSH_THEME_SVN_PROMPT_CLEAN=" " \ No newline at end of file +ZSH_THEME_SVN_PROMPT_CLEAN=" " diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme index f0ee6a5bd..72bd5ea81 100644 --- a/themes/bira.zsh-theme +++ b/themes/bira.zsh-theme @@ -4,11 +4,11 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' local rvm_ruby='%{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v g)›%{$reset_color%}' -local git_branch='$(git_prompt_info)%{$reset_color%}' +local git_branch='$(vcs_prompt_info)%{$reset_color%}' PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} ╰─%B$%b " RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" diff --git a/themes/candy.zsh-theme b/themes/candy.zsh-theme index bc125c5ce..ed2b271c9 100644 --- a/themes/candy.zsh-theme +++ b/themes/candy.zsh-theme @@ -1,7 +1,7 @@ -PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ +PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(vcs_prompt_info)\ %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" -ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[green]%}[" +ZSH_THEME_VCS_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" +ZSH_THEME_VCS_PROMPT_CLEAN="" diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 7ee29cb8c..a4984f3df 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -1,13 +1,13 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi -PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(vcs_prompt_info)%(!.#.$) ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B" -ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B" +ZSH_THEME_VCS_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg_bold[red]%}✗" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme index ad5e2834b..d3b6af820 100644 --- a/themes/cloud.zsh-theme +++ b/themes/cloud.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(vcs_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" \ No newline at end of file +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[green]%}]" diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme index eef32e998..2daab60e0 100644 --- a/themes/dallas.zsh-theme +++ b/themes/dallas.zsh-theme @@ -8,19 +8,19 @@ DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}" # Grab the current filepath, use shortcuts: ~/Desktop # Append the current git branch, if in a git repository: ~aw@master -DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" +DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(vcs_prompt_info)%{$reset_color%}" # Grab the current username: dallas DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}" # Use a % for normal users and a # for privelaged (root) users. DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}" # For the git prompt, use a white @ and blue text for the branch name -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}" # Close it all off by resetting the color and styles. -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" # Do nothing if the branch is clean (no changes). -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_CLEAN="" # Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch! -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗" # Put it all together! PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ " diff --git a/themes/darkblood.zsh-theme b/themes/darkblood.zsh-theme index 33508fbd2..fcf3eb5f9 100644 --- a/themes/darkblood.zsh-theme +++ b/themes/darkblood.zsh-theme @@ -1,9 +1,9 @@ # meh. Dark Blood Rewind, a new beginning. -PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(git_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}]) +PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(vcs_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}]) %{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} ' PS2=$' %{$fg[red]%}|>%{$reset_color%} ' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}[%{$fg_bold[white]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] " -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[red]%}[%{$fg_bold[white]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] " +ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}" diff --git a/themes/daveverwer.zsh-theme b/themes/daveverwer.zsh-theme index 89aef926e..245389122 100644 --- a/themes/daveverwer.zsh-theme +++ b/themes/daveverwer.zsh-theme @@ -1,7 +1,7 @@ # Copied and modified from the oh-my-zsh theme from geoffgarside # Red server name, green cwd, blue git status -PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' +PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(vcs_prompt_info) %(!.#.$) ' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[blue]%}(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")%{$reset_color%}" diff --git a/themes/dieter.zsh-theme b/themes/dieter.zsh-theme index 0a5e9265b..1965af8d0 100644 --- a/themes/dieter.zsh-theme +++ b/themes/dieter.zsh-theme @@ -26,14 +26,14 @@ local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}" # Compacted $PWD local pwd="%{$fg[blue]%}%c%{$reset_color%}" -PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)' +PROMPT='${time} ${user}${host} ${pwd} $(vcs_prompt_info)' # i would prefer 1 icon that shows the "most drastic" deviation from HEAD, # but lets see how this works out -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[green]%}" # elaborate exitcode on the right when >0 return_code_enabled="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme index 3e2539d57..e61f97c20 100644 --- a/themes/dst.zsh-theme +++ b/themes/dst.zsh-theme @@ -1,8 +1,8 @@ -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[green]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[red]%}!" +ZSH_THEME_VCS_PROMPT_CLEAN="" function prompt_char { if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi @@ -10,7 +10,7 @@ function prompt_char { PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%} ) -%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(vcs_prompt_info) %_ $(prompt_char) ' RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme index 5a23fcea5..37200f719 100644 --- a/themes/dstufft.zsh-theme +++ b/themes/dstufft.zsh-theme @@ -9,11 +9,11 @@ function virtualenv_info { } PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(vcs_prompt_info) $(virtualenv_info)$(prompt_char) ' -ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_VCS_PROMPT_UNTRACKED="%{$fg[green]%}?" +ZSH_THEME_VCS_PROMPT_CLEAN="" diff --git a/themes/eastwood.zsh-theme b/themes/eastwood.zsh-theme index 83664515a..46fc66a82 100644 --- a/themes/eastwood.zsh-theme +++ b/themes/eastwood.zsh-theme @@ -3,16 +3,16 @@ if [[ -s ~/.rvm/scripts/rvm ]] ; then RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" fi -ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" -ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" +ZSH_THEME_VCS_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="" #Customized git status, oh-my-zsh currently does not allow render dirty status before branch git_custom_status() { local cb=$(current_branch) if [ -n "$cb" ]; then - echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "$(parse_vcs_dirty)$ZSH_THEME_VCS_PROMPT_PREFIX$(current_branch)$ZSH_THEME_VCS_PROMPT_SUFFIX" fi } diff --git a/themes/edvardm.zsh-theme b/themes/edvardm.zsh-theme index f9ca1a9e2..ac3bd79ce 100644 --- a/themes/edvardm.zsh-theme +++ b/themes/edvardm.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(vcs_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)'"(%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%})" diff --git a/themes/evan.zsh-theme b/themes/evan.zsh-theme index 5ef1f40dd..2ebb27159 100644 --- a/themes/evan.zsh-theme +++ b/themes/evan.zsh-theme @@ -1,2 +1,2 @@ # Evan describes this sexy prompt as: "a skinny, topless prompt" -PROMPT='%m :: %2~ %B»%b ' \ No newline at end of file +PROMPT='%m :: %2~ %B»%b ' diff --git a/themes/example.zsh-theme b/themes/example.zsh-theme index dbd9dc9c9..4ad3b7cae 100644 --- a/themes/example.zsh-theme +++ b/themes/example.zsh-theme @@ -2,4 +2,4 @@ # http://zshwiki.org/home/config/prompt # -PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " \ No newline at end of file +PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme index f22eda868..0bdb84852 100644 --- a/themes/fishy.zsh-theme +++ b/themes/fishy.zsh-theme @@ -3,7 +3,7 @@ local user_color='green'; [ $UID -eq 0 ] && user_color='red' PROMPT='%n@%m %{$fg[$user_color]%}%~%{$reset_color%}%(!.#.>) ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' -RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%})$(git_prompt_info)' +RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%})$(vcs_prompt_info)' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[cyan]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/themes/flazz.zsh-theme b/themes/flazz.zsh-theme index 280794f2b..ef67dbfca 100644 --- a/themes/flazz.zsh-theme +++ b/themes/flazz.zsh-theme @@ -5,12 +5,12 @@ fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} ' +PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(vcs_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} ' RPS1='$(vi_mode_prompt_info) ${return_code}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_bold[cyan]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" MODE_INDICATOR="%{$fg_bold[magenta]%}<%{$reset_color%}%{$fg[magenta]%}<<%{$reset_color%}" diff --git a/themes/fletcherm.zsh-theme b/themes/fletcherm.zsh-theme index e96188544..b6a6074d2 100644 --- a/themes/fletcherm.zsh-theme +++ b/themes/fletcherm.zsh-theme @@ -1,12 +1,12 @@ # Copied from old version of tonotdo's theme. LSCOLORS modified. -PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' +PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(vcs_prompt_info)%{$reset_color%}» ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg_bold[blue]%})" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" export LSCOLORS="exfxcxdxbxegedabagacad" export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' diff --git a/themes/funky.zsh-theme b/themes/funky.zsh-theme index 2451296d9..503455485 100644 --- a/themes/funky.zsh-theme +++ b/themes/funky.zsh-theme @@ -11,4 +11,4 @@ local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no} ╰─${blue_op}${smiley}${blue_cp} %# " local cur_cmd="${blue_op}%_${blue_cp}" -PROMPT2="${cur_cmd}> " \ No newline at end of file +PROMPT2="${cur_cmd}> " diff --git a/themes/gallifrey.zsh-theme b/themes/gallifrey.zsh-theme index fce7cb923..7dace4c30 100644 --- a/themes/gallifrey.zsh-theme +++ b/themes/gallifrey.zsh-theme @@ -1,8 +1,8 @@ # ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(git_prompt_info)%{$reset_color%}%B»%b ' +PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(vcs_prompt_info)%{$reset_color%}%B»%b ' RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" diff --git a/themes/garyblessington.zsh-theme b/themes/garyblessington.zsh-theme index b4f84a71c..5653370f6 100644 --- a/themes/garyblessington.zsh-theme +++ b/themes/garyblessington.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: ' +PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(vcs_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: ' -ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" +ZSH_THEME_VCS_PROMPT_PREFIX="(%{$fg[blue]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%})" diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme index cba143d42..6082b9890 100644 --- a/themes/gentoo.zsh-theme +++ b/themes/gentoo.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%#%{$reset_color%} ' +PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(vcs_prompt_info)%#%{$reset_color%} ' -ZSH_THEME_GIT_PROMPT_PREFIX="(" -ZSH_THEME_GIT_PROMPT_SUFFIX=") " +ZSH_THEME_VCS_PROMPT_PREFIX="(" +ZSH_THEME_VCS_PROMPT_SUFFIX=") " diff --git a/themes/geoffgarside.zsh-theme b/themes/geoffgarside.zsh-theme index 675ec7206..79646f276 100644 --- a/themes/geoffgarside.zsh-theme +++ b/themes/geoffgarside.zsh-theme @@ -1,5 +1,5 @@ -# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " -PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' +# PROMPT="[%*] %n:%c $(vcs_prompt_info)%(!.#.$) " +PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(vcs_prompt_info) %(!.#.$) ' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[yellow]%}"'$(vcs_name)'"(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")%{$reset_color%}" diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme index c6b752e9b..46bfe8e86 100644 --- a/themes/gozilla.zsh-theme +++ b/themes/gozilla.zsh-theme @@ -1,15 +1,15 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(vcs_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")" -ZSH_THEME_GIT_PROMPT_DIRTY="" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX="(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")" +ZSH_THEME_VCS_PROMPT_DIRTY="" +ZSH_THEME_VCS_PROMPT_CLEAN="" -RPROMPT='$(git_prompt_status)%{$reset_color%}' +RPROMPT='$(vcs_prompt_status)%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" -ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" -ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" +ZSH_THEME_VCS_PROMPT_ADDED="%{$fg[cyan]%} ✈" +ZSH_THEME_VCS_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" +ZSH_THEME_VCS_PROMPT_DELETED="%{$fg[red]%} ✗" +ZSH_THEME_VCS_PROMPT_RENAMED="%{$fg[blue]%} ➦" +ZSH_THEME_VCS_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" +ZSH_THEME_VCS_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" diff --git a/themes/imajes.zsh-theme b/themes/imajes.zsh-theme index 88c35b6d9..918cd8081 100644 --- a/themes/imajes.zsh-theme +++ b/themes/imajes.zsh-theme @@ -2,4 +2,4 @@ # http://zshwiki.org/home/config/prompt # -PROMPT="%{$fg[red]%}%%%{$reset_color%} " \ No newline at end of file +PROMPT="%{$fg[red]%}%%%{$reset_color%} " diff --git a/themes/jbergantine.zsh-theme b/themes/jbergantine.zsh-theme index d84247cff..2ebcb351b 100644 --- a/themes/jbergantine.zsh-theme +++ b/themes/jbergantine.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(vcs_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%})" +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)'"(%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[white]%})" diff --git a/themes/josh.zsh-theme b/themes/josh.zsh-theme index 6bed1a70e..251d3f642 100644 --- a/themes/josh.zsh-theme +++ b/themes/josh.zsh-theme @@ -1,9 +1,9 @@ grey='\e[0;90m' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$grey%}(" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$grey%})" function josh_prompt { (( spare_width = ${COLUMNS} )) @@ -31,7 +31,7 @@ function josh_prompt { prompt=" $prompt" done - prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)" + prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(vcs_prompt_info)" echo $prompt } diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 0fa6b4ecd..aecfed1f0 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -4,13 +4,13 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ -$(git_prompt_info)\ +$(vcs_prompt_info)\ %{$fg[red]%}%(!.#.»)%{$reset_color%} ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' RPS1='${return_code}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="⚡" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_DIRTY="⚡" diff --git a/themes/kardan.zsh-theme b/themes/kardan.zsh-theme index fd6586a9d..1125b9ee2 100644 --- a/themes/kardan.zsh-theme +++ b/themes/kardan.zsh-theme @@ -5,8 +5,8 @@ function get_host { } PROMPT='> ' -RPROMPT='%~$(git_prompt_info)$(get_host)' +RPROMPT='%~$(vcs_prompt_info)$(get_host)' -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_PREFIX="(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")" \ No newline at end of file +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")" diff --git a/themes/kennethreitz.zsh-theme b/themes/kennethreitz.zsh-theme index 109be0c22..c56a7aec9 100644 --- a/themes/kennethreitz.zsh-theme +++ b/themes/kennethreitz.zsh-theme @@ -1,13 +1,13 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" PROMPT='%{$fg[green]%}%c \ -$(git_prompt_info)\ +$(vcs_prompt_info)\ %{$fg[red]%}%(!.#.»)%{$reset_color%} ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} ' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}" diff --git a/themes/lambda.zsh-theme b/themes/lambda.zsh-theme index 63292d331..572f4d862 100644 --- a/themes/lambda.zsh-theme +++ b/themes/lambda.zsh-theme @@ -1,6 +1,6 @@ # ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S -PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}' +PROMPT='λ %~/ $(vcs_prompt_info)%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[green]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%} " diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme index 24a0612b7..e34fa1620 100644 --- a/themes/lukerandall.zsh-theme +++ b/themes/lukerandall.zsh-theme @@ -3,8 +3,8 @@ local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b ' +PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(vcs_prompt_info)%{$reset_color%}%B»%b ' RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_VCS_PROMPT_SUFFIX=") %{$reset_color%}" diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme index 4eb410233..35b5512b9 100644 --- a/themes/macovsky-ruby.zsh-theme +++ b/themes/macovsky-ruby.zsh-theme @@ -1,8 +1,8 @@ # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' +PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(vcs_prompt_info)%{$reset_color%}%B$%b ' RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme index 4eb410233..35b5512b9 100644 --- a/themes/macovsky.zsh-theme +++ b/themes/macovsky.zsh-theme @@ -1,8 +1,8 @@ # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' +PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(vcs_prompt_info)%{$reset_color%}%B$%b ' RPS1="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[yellow]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="› %{$reset_color%}" diff --git a/themes/maran.zsh-theme b/themes/maran.zsh-theme index 6fba04688..9411f0972 100644 --- a/themes/maran.zsh-theme +++ b/themes/maran.zsh-theme @@ -1,6 +1,6 @@ # Theme with full path names and hostname # Handy if you work on different servers all the time; -PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) ' +PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(vcs_prompt_info) %(!.#.$) ' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:(" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[cyan]%}"'$(vcs_name)'"(" +ZSH_THEME_VCS_PROMPT_SUFFIX=")%{$reset_color%}" diff --git a/themes/mgutz.zsh-theme b/themes/mgutz.zsh-theme index dcf327041..428dc490e 100644 --- a/themes/mgutz.zsh-theme +++ b/themes/mgutz.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}' +PROMPT='%{$fg_bold[magenta]%}%1~$(vcs_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}[" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="*]" -ZSH_THEME_GIT_PROMPT_CLEAN="]" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_bold[yellow]%}[" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="*]" +ZSH_THEME_VCS_PROMPT_CLEAN="]" diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme index 943f04d38..e611b6832 100644 --- a/themes/mikeh.zsh-theme +++ b/themes/mikeh.zsh-theme @@ -20,4 +20,4 @@ mikeh_precmd() { # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' -PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' \ No newline at end of file +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/themes/mrtazz.zsh-theme b/themes/mrtazz.zsh-theme index 214ba5a47..c789a3e94 100644 --- a/themes/mrtazz.zsh-theme +++ b/themes/mrtazz.zsh-theme @@ -1,7 +1,7 @@ PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# ' -RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% ' +RPROMPT='%{$fg_bold[green]%}$(vcs_prompt_info)%{$reset_color%}% ' -ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}>" +ZSH_THEME_VCS_PROMPT_PREFIX="<%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[green]%}>" diff --git a/themes/nanotech.zsh-theme b/themes/nanotech.zsh-theme index 5d3331639..d4da116f6 100644 --- a/themes/nanotech.zsh-theme +++ b/themes/nanotech.zsh-theme @@ -1,7 +1,7 @@ PROMPT='%F{green}%2c%F{blue} [%f ' -RPROMPT='$(git_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f' +RPROMPT='$(vcs_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f' -ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%f" -ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}*%f" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_PREFIX="%F{yellow}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%f" +ZSH_THEME_VCS_PROMPT_DIRTY=" %F{red}*%f" +ZSH_THEME_VCS_PROMPT_CLEAN="" diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme index e7ea51a2f..5c47a931f 100644 --- a/themes/philips.zsh-theme +++ b/themes/philips.zsh-theme @@ -1,13 +1,13 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi -PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' +PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(vcs_prompt_info)%(!.#.$) ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" -ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" +ZSH_THEME_VCS_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg_bold[red]%}" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme index e4e45c71a..b4bf732a0 100644 --- a/themes/pmcgee.zsh-theme +++ b/themes/pmcgee.zsh-theme @@ -2,14 +2,14 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi PROMPT=' %{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%} -$(git_prompt_info)%(!.#.$) ' +$(vcs_prompt_info)%(!.#.$) ' RPROMPT='[%*]' # git theming -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}%B" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}%B" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg_bold[red]%}*" # LS colors, made with http://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" diff --git a/themes/rgm.zsh-theme b/themes/rgm.zsh-theme index 9452a8b0d..3d598c8e4 100644 --- a/themes/rgm.zsh-theme +++ b/themes/rgm.zsh-theme @@ -1,8 +1,8 @@ PROMPT=' %n@%m %{$fg[cyan]%}%~ -%? $(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}' +%? $(vcs_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%}" diff --git a/themes/risto.zsh-theme b/themes/risto.zsh-theme index cb773a64e..78c815135 100644 --- a/themes/risto.zsh-theme +++ b/themes/risto.zsh-theme @@ -1,6 +1,6 @@ # -*- sh -*- vim:set ft=sh ai et sw=4 sts=4: # It might be bash like, but I can't have my co-workers knowing I use zsh -PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $(git_prompt_info)%{$reset_color%}%(!.#.$) ' +PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $(vcs_prompt_info)%{$reset_color%}%(!.#.$) ' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[red]%}‹" +ZSH_THEME_VCS_PROMPT_SUFFIX="›%{$reset_color%}" diff --git a/themes/rixius.zsh-theme b/themes/rixius.zsh-theme index c0c5c9c71..662a140c3 100644 --- a/themes/rixius.zsh-theme +++ b/themes/rixius.zsh-theme @@ -14,11 +14,11 @@ function prompt_char { RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}" PROMPT=' -%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info) +%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(vcs_prompt_info) $(prompt_char) ' RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}" diff --git a/themes/robbyrussell.zsh-theme b/themes/robbyrussell.zsh-theme index 7b524e82d..ca238c96e 100644 --- a/themes/robbyrussell.zsh-theme +++ b/themes/robbyrussell.zsh-theme @@ -1,6 +1,6 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(vcs_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)'":(%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%})" diff --git a/themes/skaro.zsh-theme b/themes/skaro.zsh-theme index 84b7b11b0..f2c30b7ee 100644 --- a/themes/skaro.zsh-theme +++ b/themes/skaro.zsh-theme @@ -1,7 +1,7 @@ -PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}» ' +PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(vcs_prompt_info) %{$reset_color%}» ' -ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" +ZSH_THEME_VCS_PROMPT_PREFIX='$(vcs_name)'"(%{$fg[red]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN="%{$fg[blue]%})" diff --git a/themes/sorin.zsh-theme b/themes/sorin.zsh-theme index 601dbe5d7..2d8729ee9 100644 --- a/themes/sorin.zsh-theme +++ b/themes/sorin.zsh-theme @@ -11,38 +11,38 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" - PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} ' + PROMPT='%{$fg[cyan]%}%c$(vcs_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} ' - ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}" - ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" - ZSH_THEME_GIT_PROMPT_DIRTY="" - ZSH_THEME_GIT_PROMPT_CLEAN="" + ZSH_THEME_VCS_PROMPT_PREFIX=" %{$fg[blue]%}"'$(vcs_name)'"%{$reset_color%}:%{$fg[red]%}" + ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" + ZSH_THEME_VCS_PROMPT_DIRTY="" + ZSH_THEME_VCS_PROMPT_CLEAN="" - RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' + RPROMPT='${return_status}$(vcs_prompt_status)%{$reset_color%}' - ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" - ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" - ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" - ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" - ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" - ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" + ZSH_THEME_VCS_PROMPT_ADDED="%{$fg[green]%} ✚" + ZSH_THEME_VCS_PROMPT_MODIFIED="%{$fg[blue]%} ✹" + ZSH_THEME_VCS_PROMPT_DELETED="%{$fg[red]%} ✖" + ZSH_THEME_VCS_PROMPT_RENAMED="%{$fg[magenta]%} ➜" + ZSH_THEME_VCS_PROMPT_UNMERGED="%{$fg[yellow]%} ═" + ZSH_THEME_VCS_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" else MODE_INDICATOR="❮❮❮" local return_status="%(?::⏎)" - PROMPT='%c$(git_prompt_info) %(!.#.❯) ' + PROMPT='%c$(vcs_prompt_info) %(!.#.❯) ' - ZSH_THEME_GIT_PROMPT_PREFIX=" git:" - ZSH_THEME_GIT_PROMPT_SUFFIX="" - ZSH_THEME_GIT_PROMPT_DIRTY="" - ZSH_THEME_GIT_PROMPT_CLEAN="" + ZSH_THEME_VCS_PROMPT_PREFIX=" "'$(vcs_name)' + ZSH_THEME_VCS_PROMPT_SUFFIX="" + ZSH_THEME_VCS_PROMPT_DIRTY="" + ZSH_THEME_VCS_PROMPT_CLEAN="" - RPROMPT='${return_status}$(git_prompt_status)' + RPROMPT='${return_status}$(vcs_prompt_status)' - ZSH_THEME_GIT_PROMPT_ADDED=" ✚" - ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹" - ZSH_THEME_GIT_PROMPT_DELETED=" ✖" - ZSH_THEME_GIT_PROMPT_RENAMED=" ➜" - ZSH_THEME_GIT_PROMPT_UNMERGED=" ═" - ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" + ZSH_THEME_VCS_PROMPT_ADDED=" ✚" + ZSH_THEME_VCS_PROMPT_MODIFIED=" ✹" + ZSH_THEME_VCS_PROMPT_DELETED=" ✖" + ZSH_THEME_VCS_PROMPT_RENAMED=" ➜" + ZSH_THEME_VCS_PROMPT_UNMERGED=" ═" + ZSH_THEME_VCS_PROMPT_UNTRACKED=" ✭" fi diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme index db0fc4277..979bac705 100644 --- a/themes/sporty_256.zsh-theme +++ b/themes/sporty_256.zsh-theme @@ -3,11 +3,11 @@ # Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ # based on robbyrussell's shell but louder! -PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f +PROMPT='%{$fg_bold[blue]%}$(vcs_prompt_info) %F{208}%c%f %{$fg_bold[white]%}%# %{$reset_color%}' RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|" +ZSH_THEME_VCS_PROMPT_PREFIX="%F{154}±|%f%F{124}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|" diff --git a/themes/takashiyoshida.zsh-theme b/themes/takashiyoshida.zsh-theme index 419a8cf3f..5f6ac71d4 100644 --- a/themes/takashiyoshida.zsh-theme +++ b/themes/takashiyoshida.zsh-theme @@ -10,7 +10,7 @@ PROMPT_BRACKET_END='%{$fg_bold[white]%}]' PROMPT_USER='%{$fg_bold[white]%}%n' PROMPT_SIGN='%{$reset_color%}%#' -GIT_PROMPT_INFO='$(git_prompt_info)' +GIT_PROMPT_INFO='$(vcs_prompt_info)' # My current prompt looks like: # [host:current_dir] (git_prompt_info) @@ -21,7 +21,7 @@ ${PROMPT_BRACKET_BEGIN}${PROMPT_USER}${PROMPT_BRACKET_END}${PROMPT_SIGN} " # # Git repository # -ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" -ZSH_THEME_GIT_PROMPT_CLEAN='' +ZSH_THEME_VCS_PROMPT_PREFIX=" on %{$fg[magenta]%}" +ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_VCS_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_VCS_PROMPT_CLEAN='' diff --git a/themes/theunraveler.zsh-theme b/themes/theunraveler.zsh-theme index e4bfb79c5..b5102b0f4 100644 --- a/themes/theunraveler.zsh-theme +++ b/themes/theunraveler.zsh-theme @@ -2,15 +2,15 @@ PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}' -RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(git_prompt_status)%{$reset_color%}' +RPROMPT='%{$fg[magenta]%}$(vcs_prompt_info)%{$reset_color%} $(vcs_prompt_status)%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX="" -ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_DIRTY="" -ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" -ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" -ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" -ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" -ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" \ No newline at end of file +ZSH_THEME_VCS_PROMPT_PREFIX="" +ZSH_THEME_VCS_PROMPT_SUFFIX="" +ZSH_THEME_VCS_PROMPT_DIRTY="" +ZSH_THEME_VCS_PROMPT_CLEAN="" +ZSH_THEME_VCS_PROMPT_ADDED="%{$fg[cyan]%} ✈" +ZSH_THEME_VCS_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" +ZSH_THEME_VCS_PROMPT_DELETED="%{$fg[red]%} ✗" +ZSH_THEME_VCS_PROMPT_RENAMED="%{$fg[blue]%} ➦" +ZSH_THEME_VCS_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" +ZSH_THEME_VCS_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" diff --git a/themes/thomasjbradley.zsh-theme b/themes/thomasjbradley.zsh-theme index 857301d19..402594fc7 100644 --- a/themes/thomasjbradley.zsh-theme +++ b/themes/thomasjbradley.zsh-theme @@ -17,13 +17,13 @@ patches: %{\e[0m%}%b ' +%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(vcs_prompt_info)>%{\e[0m%}%b ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '