File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,11 @@ diffStatus() {
9191 echo " Note: GIT diff cann compare four locations with each other: "
9292 echo " your working directory, the stage, the repository."
9393 echo
94- coloredLog " ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐" " $clrPurple " " $clrBlack "
95- coloredLog " │ │ │ │ │ │ │ │" " $clrPurple " " $clrBlack "
96- coloredLog " │ │ -> │ │ -> │ │ -> │ │" " $clrPurple " " $clrBlack "
97- coloredLog " └────────┘ └────────┘ └────────┘ └────────┘" " $clrPurple " " $clrBlack "
98- coloredLog " work dir stage local repo remote repo" " $clrWhite " " $clrBlack "
94+ coloredLog " ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐" " $clrPurple " " $clrBlack " && printf " \n\r "
95+ coloredLog " │ │ │ │ │ │ │ │" " $clrPurple " " $clrBlack " && printf " \n\r "
96+ coloredLog " │ │ -> │ │ -> │ │ -> │ │" " $clrPurple " " $clrBlack " && printf " \n\r "
97+ coloredLog " └────────┘ └────────┘ └────────┘ └────────┘" " $clrPurple " " $clrBlack " && printf " \n\r "
98+ coloredLog " work dir stage local repo remote repo" " $clrWhite " " $clrBlack " && printf " \n\r "
9999}
100100
101101git fetch --all
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ submenuBGClr="$clrBlack" # the default sub menu heading background co
2727delimiter=⊕ # the delimiter used in menu array
2828submenu_pad_symbol=" ─" # Default submenu border symbol
2929submenu_corner_symbol=" ┐" # Default submenu corner symbol
30+ sub_menu_bold=false # whether to print out submenu bold
3031
3132# Internal global variables (DO NOT CHANGE)
3233formattedheading=" " # the cache for formatted heading
@@ -142,10 +143,13 @@ startMenu() {
142143# $1: log text
143144# $2: optional: foreground color
144145# $3: optional: background color
146+ # $4: optional: bold
145147# Outputs:
146148# Writes colored log to standard out
147149# ######################################
148150coloredLog () {
151+ local bold=${4:- false}
152+ $bold && printf " \033[1m\e[38;5;%sm\e[48;5;%sm%s\e[38;5;7m\e[48;5;0m\033[0m" " $2 " " $3 " " $1 " && return
149153 printf " \e[38;5;%sm\e[48;5;%sm%s\e[38;5;7m\e[48;5;0m" " $2 " " $3 " " $1 "
150154}
151155
@@ -570,7 +574,7 @@ printSubmenuHeading(){
570574 local width=" ${2:- $calculatedMenuWidth } "
571575 local symbol=" ${3:- $submenu_pad_symbol } "
572576 local paddedline=" $( r_pad " $1 " " $width " " $symbol " ) $submenu_corner_symbol "
573- coloredLog " $paddedline \n\r" " $submenuFGClr " " $submenuBGClr "
577+ coloredLog " $paddedline \n\r" " $submenuFGClr " " $submenuBGClr " $sub_menu_bold
574578}
575579
576580# ################################################
You can’t perform that action at this time.
0 commit comments