mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
migrate to top level vcsinfo support
This commit is contained in:
parent
740d547dfd
commit
538801a4db
1 changed files with 8 additions and 0 deletions
8
plugins/vcsinfo/vcsinfo.plugin.zsh → lib/vcsinfo.zsh
Executable file → Normal file
8
plugins/vcsinfo/vcsinfo.plugin.zsh → lib/vcsinfo.zsh
Executable file → Normal file
|
|
@ -10,8 +10,16 @@
|
|||
typeset -ga precmd_functions
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:git:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' formats "$ZSH_THEME_GIT_PROMPT_PREFIX%b%u%F$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
zstyle ':vcs_info:git:*' unstagedstr "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
|
||||
zsh_vcsinfo_precmd() {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
vcs_prompt_info() {
|
||||
echo "${vcs_info_msg_0_}"
|
||||
}
|
||||
|
||||
precmd_functions+='zsh_vcsinfo_precmd'
|
||||
Loading…
Add table
Add a link
Reference in a new issue