You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: themes/Default.bgptheme
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -34,60 +34,60 @@ define_helpers() {
34
34
}
35
35
36
36
define_undefined_git_prompt_colors() {
37
-
if [[ ! -v GIT_PROMPT_THEME_NAME ]]; then GIT_PROMPT_THEME_NAME="Default"; fi
37
+
if [ -z ${GIT_PROMPT_THEME_NAME+x} ]; then GIT_PROMPT_THEME_NAME="Default"; fi
38
38
39
39
# These are the color definitions used by gitprompt.sh
40
-
if [[ ! -v GIT_PROMPT_PREFIX ]]; then GIT_PROMPT_PREFIX="["; fi # start of the git info string
41
-
if [[ ! -v GIT_PROMPT_SUFFIX ]]; then GIT_PROMPT_SUFFIX="]"; fi # the end of the git info string
42
-
if [[ ! -v GIT_PROMPT_SEPARATOR ]]; then GIT_PROMPT_SEPARATOR="|"; fi # separates each item
40
+
if [ -z ${GIT_PROMPT_PREFIX+x} ]; then GIT_PROMPT_PREFIX="["; fi # start of the git info string
41
+
if [ -z ${GIT_PROMPT_SUFFIX+x} ]; then GIT_PROMPT_SUFFIX="]"; fi # the end of the git info string
42
+
if [ -z ${GIT_PROMPT_SEPARATOR+x} ]; then GIT_PROMPT_SEPARATOR="|"; fi # separates each item
43
43
44
-
if [[ ! -v GIT_PROMPT_BRANCH ]]; then GIT_PROMPT_BRANCH="${Magenta}"; fi # the git branch that is active in the current directory
45
-
if [[ ! -v GIT_PROMPT_STAGED ]]; then GIT_PROMPT_STAGED="${Red}●"; fi # the number of staged files/directories
46
-
if [[ ! -v GIT_PROMPT_CONFLICTS ]]; then GIT_PROMPT_CONFLICTS="${Red}✖ "; fi # the number of files in conflict
47
-
if [[ ! -v GIT_PROMPT_CHANGED ]]; then GIT_PROMPT_CHANGED="${Blue}✚ "; fi # the number of changed files
44
+
if [ -z ${GIT_PROMPT_BRANCH+x} ]; then GIT_PROMPT_BRANCH="${Magenta}"; fi # the git branch that is active in the current directory
45
+
if [ -z ${GIT_PROMPT_STAGED+x} ]; then GIT_PROMPT_STAGED="${Red}●"; fi # the number of staged files/directories
46
+
if [ -z ${GIT_PROMPT_CONFLICTS+x} ]; then GIT_PROMPT_CONFLICTS="${Red}✖ "; fi # the number of files in conflict
47
+
if [ -z ${GIT_PROMPT_CHANGED+x} ]; then GIT_PROMPT_CHANGED="${Blue}✚ "; fi # the number of changed files
48
48
49
-
if [[ ! -v GIT_PROMPT_REMOTE ]]; then GIT_PROMPT_REMOTE=" "; fi # the remote branch name (if any) and the symbols for ahead and behind
50
-
if [[ ! -v GIT_PROMPT_UNTRACKED ]]; then GIT_PROMPT_UNTRACKED="${Cyan}…"; fi # the number of untracked files/dirs
51
-
if [[ ! -v GIT_PROMPT_STASHED ]]; then GIT_PROMPT_STASHED="${BoldBlue}⚑ "; fi # the number of stashed files/dir
52
-
if [[ ! -v GIT_PROMPT_CLEAN ]]; then GIT_PROMPT_CLEAN="${BoldGreen}✔"; fi # a colored flag indicating a "clean" repo
49
+
if [ -z ${GIT_PROMPT_REMOTE+x} ]; then GIT_PROMPT_REMOTE=" "; fi # the remote branch name (if any) and the symbols for ahead and behind
50
+
if [ -z ${GIT_PROMPT_UNTRACKED+x} ]; then GIT_PROMPT_UNTRACKED="${Cyan}…"; fi # the number of untracked files/dirs
51
+
if [ -z ${GIT_PROMPT_STASHED+x} ]; then GIT_PROMPT_STASHED="${BoldBlue}⚑ "; fi # the number of stashed files/dir
52
+
if [ -z ${GIT_PROMPT_CLEAN+x} ]; then GIT_PROMPT_CLEAN="${BoldGreen}✔"; fi # a colored flag indicating a "clean" repo
53
53
54
54
# For the command indicator, the placeholder _LAST_COMMAND_STATE_
55
55
# will be replaced with the exit code of the last command
56
56
# e.g.
57
57
# GIT_PROMPT_COMMAND_OK="${Green}✔-_LAST_COMMAND_STATE_ " # indicator if the last command returned with an exit code of 0
58
58
# GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # indicator if the last command returned with an exit code of other than 0
59
59
60
-
if [[ ! -v GIT_PROMPT_COMMAND_OK ]]; then GIT_PROMPT_COMMAND_OK="${Green}✔"; fi # indicator if the last command returned with an exit code of 0
61
-
if [[ ! -v GIT_PROMPT_COMMAND_FAIL ]]; then GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_"; fi # indicator if the last command returned with an exit code of other than 0
60
+
if [ -z ${GIT_PROMPT_COMMAND_OK+x} ]; then GIT_PROMPT_COMMAND_OK="${Green}✔"; fi # indicator if the last command returned with an exit code of 0
61
+
if [ -z ${GIT_PROMPT_COMMAND_FAIL+x} ]; then GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_"; fi # indicator if the last command returned with an exit code of other than 0
62
62
63
63
# Possible to change which command is used to create git status information
# 2) gitstatus_pre-1.7.10.sh (Uses a variety of git commands and pipes - slower, works with older git clients)
67
67
# 3) gitstatus.py (Unsupported, lack features found in the bash versions)
68
-
if [[ ! -v GIT_PROMPT_STATUS_COMMAND ]]; then GIT_PROMPT_STATUS_COMMAND="gitstatus.sh"; fi # Point out the command to get the git status from
68
+
if [ -z ${GIT_PROMPT_STATUS_COMMAND+x} ]; then GIT_PROMPT_STATUS_COMMAND="gitstatus.sh"; fi # Point out the command to get the git status from
69
69
70
70
# template for displaying the current virtual environment
71
71
# use the placeholder _VIRTUALENV_ will be replaced with
72
72
# the name of the current virtual environment (currently CONDA and VIRTUAL_ENV)
73
-
if [[ ! -v GIT_PROMPT_VIRTUALENV ]]; then GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) "; fi
73
+
if [ -z ${GIT_PROMPT_VIRTUALENV+x} ]; then GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) "; fi
74
74
75
75
# template for displaying the current remote tracking branch
76
76
# use the placeholder _UPSTREAM_ will be replaced with
77
77
# the name of the current remote tracking branch
78
-
if [[ ! -v GIT_PROMPT_UPSTREAM ]]; then GIT_PROMPT_UPSTREAM=" {${Blue}_UPSTREAM_${ResetColor}}"; fi
78
+
if [ -z ${GIT_PROMPT_UPSTREAM+x} ]; then GIT_PROMPT_UPSTREAM=" {${Blue}_UPSTREAM_${ResetColor}}"; fi
79
79
80
80
# _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL
81
-
if [[ ! -v GIT_PROMPT_START_USER ]]; then GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"; fi
82
-
if [[ ! -v GIT_PROMPT_START_ROOT ]]; then GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"; fi
83
-
if [[ ! -v GIT_PROMPT_END_USER ]]; then GIT_PROMPT_END_USER=" \n${White}${Time12a}${ResetColor} $ "; fi
84
-
if [[ ! -v GIT_PROMPT_END_ROOT ]]; then GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "; fi
81
+
if [ -z ${GIT_PROMPT_START_USER+x} ]; then GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"; fi
82
+
if [ -z ${GIT_PROMPT_START_ROOT+x} ]; then GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"; fi
83
+
if [ -z ${GIT_PROMPT_END_USER+x} ]; then GIT_PROMPT_END_USER=" \n${White}${Time12a}${ResetColor} $ "; fi
84
+
if [ -z ${GIT_PROMPT_END_ROOT+x} ]; then GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "; fi
85
85
86
86
# Please do not add colors to these symbols
87
-
if [[ ! -v GIT_PROMPT_SYMBOLS_AHEAD ]]; then GIT_PROMPT_SYMBOLS_AHEAD="↑·"; fi # The symbol for "n versions ahead of origin"
88
-
if [[ ! -v GIT_PROMPT_SYMBOLS_BEHIND ]]; then GIT_PROMPT_SYMBOLS_BEHIND="↓·"; fi # The symbol for "n versions behind of origin"
89
-
if [[ ! -v GIT_PROMPT_SYMBOLS_PREHASH ]]; then GIT_PROMPT_SYMBOLS_PREHASH=":"; fi # Written before hash of commit, if no name could be found
90
-
if [[ ! -v GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING ]]; then GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="L"; fi # This symbol is written after the branch, if the branch is not tracked
87
+
if [ -z ${GIT_PROMPT_SYMBOLS_AHEAD+x} ]; then GIT_PROMPT_SYMBOLS_AHEAD="↑·"; fi # The symbol for "n versions ahead of origin"
88
+
if [ -z ${GIT_PROMPT_SYMBOLS_BEHIND+x} ]; then GIT_PROMPT_SYMBOLS_BEHIND="↓·"; fi # The symbol for "n versions behind of origin"
89
+
if [ -z ${GIT_PROMPT_SYMBOLS_PREHASH+x} ]; then GIT_PROMPT_SYMBOLS_PREHASH=":"; fi # Written before hash of commit, if no name could be found
90
+
if [ -z ${GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING+x} ]; then GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="L"; fi # This symbol is written after the branch, if the branch is not tracked
0 commit comments