Skip to content
Snippets Groups Projects
Commit 87adeca4 authored by Ayaz Badouraly's avatar Ayaz Badouraly
Browse files

Fixing unused values of %m in vcs prompt

parent 06cdf442
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,13 @@ function +vi-git-stash() { ...@@ -58,7 +58,13 @@ function +vi-git-stash() {
fi fi
} }
zstyle ':vcs_info:git*+set-message:*' hooks git-stash git-untracked # Erase hook_com[misc] ( ie. %m ) to avoid dealing with backends info outputs
# Add $vcs_clean_color to setup default %b coloring in vcs prompt
function +vi-misc-init() {
hook_com[misc]=$vcs_clean_color
}
zstyle ':vcs_info:git*+set-message:*' hooks misc-init git-stash git-untracked
# In normal formats and actionformats the following replacements are done: # In normal formats and actionformats the following replacements are done:
# %s : The VCS in use (git, hg, svn, etc.). # %s : The VCS in use (git, hg, svn, etc.).
...@@ -73,8 +79,8 @@ zstyle ':vcs_info:git*+set-message:*' hooks git-stash git-untracked ...@@ -73,8 +79,8 @@ zstyle ':vcs_info:git*+set-message:*' hooks git-stash git-untracked
# %m : A "misc" replacement. It is at the discretion of the backend to decide what this replacement expands to. # %m : A "misc" replacement. It is at the discretion of the backend to decide what this replacement expands to.
local vcs_formats_prefix="%F{magenta}(%F{white}%s%F{magenta})%f" local vcs_formats_prefix="%F{magenta}(%F{white}%s%F{magenta})%f"
local vcs_formats_hyphen="%F{yellow}-%f" local vcs_formats_hyphen="%F{yellow}-%f"
local vcs_formats_normal="%F{magenta}[$vcs_clean_color%m%c%u%b%F{magenta}]%f" local vcs_formats_normal="%F{magenta}[%m%c%u%b%F{magenta}]%f"
local vcs_formats_action="%F{magenta}[$vcs_clean_color%m%c%u%b%F{yellow}:%F{red}%a%F{magenta}]%f" local vcs_formats_action="%F{magenta}[%m%c%u%b%F{yellow}:%F{red}%a%F{magenta}]%f"
zstyle ':vcs_info:*' formats " $vcs_formats_prefix$vcs_formats_hyphen$vcs_formats_normal" zstyle ':vcs_info:*' formats " $vcs_formats_prefix$vcs_formats_hyphen$vcs_formats_normal"
zstyle ':vcs_info:*' actionformats " $vcs_formats_prefix$vcs_formats_hyphen$vcs_formats_action" zstyle ':vcs_info:*' actionformats " $vcs_formats_prefix$vcs_formats_hyphen$vcs_formats_action"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment