mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 15:34:40 +01:00
vcs_info fallback for oldish zsh
This commit is contained in:
parent
301d1e796b
commit
dc15a4c6e4
1 changed files with 11 additions and 5 deletions
|
|
@ -1,9 +1,15 @@
|
||||||
|
autoload -U is-at-least
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
zstyle ':vcs_info:*' enable git hg
|
zstyle ':vcs_info:*' enable git hg
|
||||||
zstyle ':vcs_info:*' stagedstr "%F{red}±%f"
|
vcs_format="%F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f"
|
||||||
zstyle ':vcs_info:*' unstagedstr "%F{yellow}≠%f"
|
if is-at-least 4.3.11; then
|
||||||
zstyle ':vcs_info:*' check-for-changes true
|
echo "foo"
|
||||||
zstyle ':vcs_info:*' formats "%c%u %F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f"
|
zstyle ':vcs_info:*' stagedstr "%F{red}±%f"
|
||||||
zstyle ':vcs_info:*' actionformats "%F{red}%a%f %c%u %F{green}%S%f‹%F{blue}%b%f‹%F{yellow}%r%f"
|
zstyle ':vcs_info:*' unstagedstr "%F{yellow}≠%f"
|
||||||
|
zstyle ':vcs_info:*' check-for-changes true
|
||||||
|
vcs_format="%c%u $vcs_format"
|
||||||
|
fi
|
||||||
|
zstyle ':vcs_info:*' formats "$vcs_format"
|
||||||
|
zstyle ':vcs_info:*' actionformats "%F{red}%a%f $vcs_format"
|
||||||
|
|
||||||
# vim: ft=zsh
|
# vim: ft=zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue