set own theme
This commit is contained in:
11
.zsh/theme/functions/git.zsh
Normal file
11
.zsh/theme/functions/git.zsh
Normal file
@@ -0,0 +1,11 @@
|
||||
function git_prompt_info() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
local ref=$(git symbolic-ref HEAD 2>/dev/null)
|
||||
local branch=${ref#refs/heads/}
|
||||
if [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then
|
||||
echo "%F{yellow}‹${branch}%F{red}●%F{yellow}›%f"
|
||||
else
|
||||
echo "%F{yellow}‹${branch}›%f"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user