mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
feat: add new Zsh theme 'maskedsyntax'
This commit is contained in:
parent
9d8d4cf414
commit
a410285ba9
1 changed files with 30 additions and 0 deletions
30
themes/maskedsyntax.zsh-theme
Normal file
30
themes/maskedsyntax.zsh-theme
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
autoload -Uz colors && colors
|
||||
|
||||
autoload -Uz vcs_info
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
||||
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
||||
zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:svn:*' branchformat '%b'
|
||||
zstyle ':vcs_info:svn:*' actionformats '%F{5}(%F{2}%b%F{1}:%{3}%i%F{3}|%F{1}%a%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:svn:*' formats '%F{5}(%F{2}%b%F{1}:%F{3}%i%c%u%m%F{5})%f '
|
||||
zstyle ':vcs_info:*' enable git cvs svn
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks untracked-git
|
||||
|
||||
+vi-untracked-git() {
|
||||
if command git status --porcelain 2>/dev/null | command grep -q '??'; then
|
||||
hook_com[misc]='%F{red}?'
|
||||
else
|
||||
hook_com[misc]=''
|
||||
fi
|
||||
}
|
||||
|
||||
gentoo_precmd() {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd gentoo_precmd
|
||||
|
||||
PROMPT='[%F{red}%n%f%F{white}@%F{cyan}%m%f %F{magenta}%~%f] ${vcs_info_msg_0_}$ '
|
||||
Loading…
Add table
Add a link
Reference in a new issue