File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030echo.BoldGreen " ColorEcho generator start!"
3131
32- for shell in sh bash fish ksh zsh
33- do
32+ for shell in sh bash fish ksh zsh; do
3433 {
3534 echo.BoldYellow " Generating ColorEcho for ${shell} shell ..."
3635 # shell specify configs and tricks
9594fi
9695SH_ECHO
9796 fi
98- awk ' {print $1}' " ${table} " | while IFS= read -r color
99- do
97+ awk ' {print $1}' " ${table} " | while IFS= read -r color; do
10098 # light or not
101- for light in " " " Light"
102- do
99+ for light in " " " Light" ; do
103100 if [ " ${light} " = " " ]; then
104101 code=3
105102 else
106103 code=9
107104 fi
108105 # bold or not
109- for bold in " " " Bold"
110- do
106+ for bold in " " " Bold" ; do
111107 if [ " ${bold} " = " " ]; then
112108 bCode=
113109 else
114110 bCode=' 1;'
115111 fi
116112 # underline or not
117- for underLine in " " " UL"
118- do
113+ for underLine in " " " UL" ; do
119114 {
120115 echo " "
121116 echo " ${fn} echo${dot}${light}${bold}${underLine}${color}${brackets} "
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ dir="$(cd "$(dirname "$0")" && pwd)"
55script=" ${dir} /../dist/ColorEcho.bash"
66. " ${script} "
77
8- awk ' /^function +echo/ {print $2}' " ${script} " | while IFS= read -r x
9- do
8+ awk ' /^function +echo/ {print $2}' " ${script} " | while IFS= read -r x; do
109 ${x} " ${x} "
1110done
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ dir="$(cd "$(dirname "$_")" && pwd)"
55script=" ${dir} /../dist/ColorEcho.sh"
66. " ${script} "
77
8- grep -E " echo[a-zA-Z]+()" " ${script} " | sed ' s/()//g' | while IFS= read -r x
9- do
8+ grep -E " echo[a-zA-Z]+()" " ${script} " | sed ' s/()//g' | while IFS= read -r x; do
109 ${x} " ${x} "
1110done
You canβt perform that action at this time.
0 commit comments