mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merging geoffgarside work
This commit is contained in:
commit
00cbdd6ed9
6 changed files with 44 additions and 10 deletions
4
git.zsh
4
git.zsh
|
|
@ -3,7 +3,7 @@ function git_prompt_info() {
|
|||
if [[ -d .git ]]; then
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
branch=${ref#refs/heads/}
|
||||
CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}%{$fg[red])"
|
||||
CURRENT_BRANCH="git:(%{$fg[red]%}${branch}%{$fg[blue]%})%{$reset_color%}$(parse_git_dirty)"
|
||||
else
|
||||
CURRENT_BRANCH=''
|
||||
fi
|
||||
|
|
@ -12,5 +12,5 @@ function git_prompt_info() {
|
|||
}
|
||||
|
||||
parse_git_dirty () {
|
||||
[[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "%{$fg[white] ♻ "
|
||||
[[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue