mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
Cleaned up logic in bureau_git_prompt function
This commit is contained in:
parent
67dad45b38
commit
6c7a045794
1 changed files with 6 additions and 7 deletions
|
|
@ -64,17 +64,16 @@ bureau_git_status() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bureau_git_prompt () {
|
bureau_git_prompt () {
|
||||||
local _branch=$(bureau_git_branch)
|
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||||
local _status=$(bureau_git_status)
|
local _branch=$(bureau_git_branch)
|
||||||
local _result=""
|
local _status=$(bureau_git_status)
|
||||||
if [[ "${_branch}x" != "x" ]]; then
|
local _result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
|
||||||
_result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
|
if [[ -n "$_status" ]]; then
|
||||||
if [[ "${_status}x" != "x" ]]; then
|
|
||||||
_result="$_result $_status"
|
_result="$_result $_status"
|
||||||
fi
|
fi
|
||||||
_result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
_result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
|
echo $_result
|
||||||
fi
|
fi
|
||||||
echo $_result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue