change to setting variables to empty value before use
parent
10d075c9c5
commit
1a7ebf4da7
|
|
@ -7,6 +7,8 @@ CLOCK_THEME_PROMPT_SUFFIX=''
|
||||||
|
|
||||||
THEME_PROMPT_HOST='\H'
|
THEME_PROMPT_HOST='\H'
|
||||||
|
|
||||||
|
SCM=
|
||||||
|
|
||||||
SCM_CHECK=${SCM_CHECK:=true}
|
SCM_CHECK=${SCM_CHECK:=true}
|
||||||
|
|
||||||
SCM_THEME_PROMPT_DIRTY=' ✗'
|
SCM_THEME_PROMPT_DIRTY=' ✗'
|
||||||
|
|
@ -64,6 +66,8 @@ THEME_SHOW_USER_HOST=${THEME_SHOW_USER_HOST:=false}
|
||||||
USER_HOST_THEME_PROMPT_PREFIX=''
|
USER_HOST_THEME_PROMPT_PREFIX=''
|
||||||
USER_HOST_THEME_PROMPT_SUFFIX=''
|
USER_HOST_THEME_PROMPT_SUFFIX=''
|
||||||
|
|
||||||
|
VIRTUAL_ENV=
|
||||||
|
|
||||||
VIRTUALENV_THEME_PROMPT_PREFIX=' |'
|
VIRTUALENV_THEME_PROMPT_PREFIX=' |'
|
||||||
VIRTUALENV_THEME_PROMPT_SUFFIX='|'
|
VIRTUALENV_THEME_PROMPT_SUFFIX='|'
|
||||||
|
|
||||||
|
|
@ -122,7 +126,7 @@ function scm_prompt_info_common {
|
||||||
SCM_DIRTY=0
|
SCM_DIRTY=0
|
||||||
SCM_STATE=''
|
SCM_STATE=''
|
||||||
|
|
||||||
if [[ ${SCM:-} == ${SCM_GIT} ]]; then
|
if [[ ${SCM} == ${SCM_GIT} ]]; then
|
||||||
if [[ ${SCM_GIT_SHOW_MINIMAL_INFO} == true ]]; then
|
if [[ ${SCM_GIT_SHOW_MINIMAL_INFO} == true ]]; then
|
||||||
# user requests minimal git status information
|
# user requests minimal git status information
|
||||||
git_prompt_minimal_info
|
git_prompt_minimal_info
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,8 @@ function _git-hide-status {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _git-status {
|
function _git-status {
|
||||||
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && local git_status_flags='-uno'
|
local git_status_flags=
|
||||||
|
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno'
|
||||||
git status --porcelain ${git_status_flags:-} 2> /dev/null
|
git status --porcelain ${git_status_flags:-} 2> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +103,8 @@ function _git-status-counts {
|
||||||
function _git-remote-info {
|
function _git-remote-info {
|
||||||
[[ "$(_git-upstream)" == "" ]] && return
|
[[ "$(_git-upstream)" == "" ]] && return
|
||||||
|
|
||||||
[[ "$(_git-branch)" == "$(_git-upstream-branch)" ]] && local same_branch_name=true
|
local same_branch_name=
|
||||||
|
[[ "$(_git-branch)" == "$(_git-upstream-branch)" ]] && same_branch_name=true
|
||||||
if ([[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "auto" ]] && [[ "$(_git-num-remotes)" -ge 2 ]]) ||
|
if ([[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "auto" ]] && [[ "$(_git-num-remotes)" -ge 2 ]]) ||
|
||||||
[[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "true" ]]; then
|
[[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "true" ]]; then
|
||||||
if [[ "${same_branch_name}" != "true" ]]; then
|
if [[ "${same_branch_name}" != "true" ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue