-
Notifications
You must be signed in to change notification settings - Fork 5
/
varsreset.sh
executable file
·134 lines (126 loc) · 2.95 KB
/
varsreset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
## /*
# @usage varsreset
#
# @description
# This script resets a handful of vars that should be reset to see changes immediately
# The intended purpose is for use in development, but it could also be used when
# running gs_refresh. After the reset, the user can choose to also refresh GitScripts.
# description@
#
# @notes
# - The gitscripts_path variable should not be included as it is determined programmatically
# by the location of the _gsinit.sh file.
# notes@
#
# @file varsreset.sh
## */
# Default answers
export clearscreenanswer="n"
export pushanswer="y"
export checkoutforbranchanswer="y"
# Flagged Actions defaults
export REPLACE_MOTD=true
export USE_GS_PROMPT=true
export IMPORT_BASHMARKS=true
export IMPORT_GIT_ALIASES=true
# Native Git variables
export GIT_MERGE_AUTOEDIT=""
# other default booleans
export showremotestate="n"
export autopushnewbranch=false
# Bash colors
export CFG_NORM=""
export CFG_BRIGHT=""
export CFG_DIM=""
export CFG_BLACK=""
export CFG_RED=""
export CFG_GREEN=""
export CFG_YELLOW=""
export CFG_BLUE=""
export CFG_MAGENTA=""
export CFG_CYAN=""
export CFG_WHITE=""
export CFG_BG_BLACK=""
export CFG_BG_RED=""
export CFG_BG_GREEN=""
export CFG_BG_YELLOW=""
export CFG_BG_BLUE=""
export CFG_BG_MAGENTA=""
export CFG_BG_CYAN=""
export CFG_BG_WHITE=""
export STYLE_BRIGHT=""
export STYLE_NORM=""
export STYLE_DIM=""
export COL_RED=""
export COL_GREEN=""
export COL_YELLOW=""
export COL_BLUE=""
export COL_MAGENTA=""
export COL_CYAN=""
export COL_WHITE=""
export COL_NORM=""
export STYLE_ACTION=""
export STYLE_ERROR=""
export STYLE_H1=""
export STYLE_H2=""
export STYLE_OUTPUT=""
export STYLE_INPUT=""
export STYLE_WARNING=""
export STYLE_QUESTION=""
export STYLE_NEWBRANCH_H1=""
export STYLE_OLDBRANCH_H1=""
export STYLE_NEWBRANCH_H2=""
export STYLE_OLDBRANCH_H2=""
export STYLE_BRANCH_WARNING=""
export STYLE_NEWBRANCH_WARNING=""
export STYLE_OLDBRANCH_WARNING=""
export STYLE_OLDBRANCH=""
export STYLE_NEWBRANCH=""
export STYLE_BRANCH=""
export STYLE_BRANCH_H1=""
export STYLE_BRANCH_H2=""
export STYLE_AHEAD=""
export STYLE_BEHIND=""
export STYLE_DELETEDFILE=""
export STYLE_DIRTY=""
export STYLE_MODIFIED=""
export STYLE_NEWFILE=""
export STYLE_RENAMEDFILE=""
export STYLE_STAGED=""
export STYLE_UNTRACKED=""
export H1=""
export H1B=""
export H2=""
export H2B=""
export WB=""
export WNB=""
export WOB=""
export A=""
export B=""
export E=""
export I=""
export O=""
export Q=""
export W=""
export X=""
export STYLE_MENU_HL=""
export STYLE_MENU_INDEX=""
export STYLE_MENU_OPTION=""
export STYLE_MENU_PROMPT=""
export STYLE_PROMPT_DATE=""
export STYLE_PROMPT_PATH=""
export STYLE_PROMPT_PATH_BRANCH=""
export STYLE_PROMPT_BRANCH=""
export STYLE_PROMPT_USER=""
echo
echo ${O}"GitScripts variables were reset!"${X}
echo
echo ${Q}"Would you like to run ${A}gs_refresh${Q}? (y) n"${X}
read yn
{ [ -z "$yn" ] || [ "$yn" = "y" ] || [ "$yn" = "Y" ]; } && {
echo
echo ${O}"Refreshing GitScripts..."${X}
echo
source ${gitscripts_path}_gsinit.sh
echo ${O}"GitScripts refreshed!"${X}
}