File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,7 @@ function main() {
28
28
print_branch_name " ${branchName} "
29
29
30
30
local branchType=" $( get_branch_type) "
31
- [ -z " ${branchType} " ] && {
32
- __print_info " branch type can't be empty"
33
- return
34
- }
35
- branchName=" ${branchName}${branchType} /"
31
+ [ -n " ${branchType} " ] && branchName=" ${branchName}${branchType} /"
36
32
print_branch_name " ${branchName} "
37
33
38
34
local name=" $( get_branch_name) "
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function __name_header() {
12
12
local edge=" $( echo " ${msg} " | sed " s/./-/g" ) "
13
13
local GBRANCH_NAME_HEADER=" ${edge} \n"
14
14
15
- local colorMsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/< type> /<branch_name>${RESET} \n"
15
+ local colorMsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/[optional type] /<branch_name>${RESET} \n"
16
16
colorMsg=" ${colorMsg}${BLUE} <enter>: ${RESET} Creates the new branch, "
17
17
colorMsg=" ${colorMsg}${BLUE} <esc>: ${RESET} exit\n\n"
18
18
colorMsg=" ${colorMsg} What is the branch name?"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function __prefix_header() {
12
12
local edge=" $( echo " ${msg} " | sed " s/./-/g" ) "
13
13
local GBRANCH_PREFIX_HEADER=" ${edge} \n"
14
14
15
- local colorMsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/< type> /<branch_name>${RESET} \n"
15
+ local colorMsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/[optional type] /<branch_name>${RESET} \n"
16
16
colorMsg=" ${colorMsg}${BLUE} <enter>: ${RESET} Add the prefix to the branch name, "
17
17
colorMsg=" ${colorMsg}${BLUE} <esc>: ${RESET} skip\n\n"
18
18
colorMsg=" ${colorMsg} (optional) Give a prefix to the branch name (e.g. issue number / JIRA ticket etc.)"
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ function __type_header() {
10
10
11
11
local msg=" <enter>: select branch type, <?>: toggle type definition, <esc>: quit"
12
12
13
- local colormsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/< type> /<branch_name>${RESET} \n\
13
+ local colormsg=" ${UNDERLINE}${MAGENTA} gbranch${RESET} follows the format ${BLUE} [optional prefix]/[optional type] /<branch_name>${RESET} \n\
14
14
${BLUE} <enter>: ${RESET} select branch type, \
15
15
${BLUE} <?>: ${RESET} toggle type definition, \
16
- ${BLUE} <esc>: ${RESET} exit \n\n"
16
+ ${BLUE} <esc>: ${RESET} skip \n\n"
17
17
18
18
colormsg=" ${colormsg} Select the type of branch"
19
19
You can’t perform that action at this time.
0 commit comments