mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
updated theme that does not check for dirty git working dirs
This commit is contained in:
parent
9dede1e0fe
commit
ea7194635b
1 changed files with 5 additions and 4 deletions
|
|
@ -3,15 +3,16 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
|
||||||
git_custom_status() {
|
git_custom_status() {
|
||||||
local cb=$(current_branch)
|
local cb=$(current_branch)
|
||||||
if [ -n "$cb" ]; then
|
if [ -n "$cb" ]; then
|
||||||
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
echo "%{$fg[green]%}[$(current_branch)]%{$reset_color%}"
|
||||||
|
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||||
|
# echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#rbenv and git settings
|
#git and rbenv
|
||||||
RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv_prompt_info`]%{$reset_color%} $EPS1'
|
RPS1='$(git_custom_status)[`rbenv_prompt_info`]`battery_pct_prompt` $EPS1'
|
||||||
|
|
||||||
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
|
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue