File tree Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 29
29
30
30
echo.BoldGreen " ColorEcho generator start!"
31
31
32
- for shell in sh bash fish ksh zsh
33
- do
32
+ for shell in sh bash fish ksh zsh; do
34
33
{
35
34
echo.BoldYellow " Generating ColorEcho for ${shell} shell ..."
36
35
# shell specify configs and tricks
95
94
fi
96
95
SH_ECHO
97
96
fi
98
- awk ' {print $1}' " ${table} " | while IFS= read -r color
99
- do
97
+ awk ' {print $1}' " ${table} " | while IFS= read -r color; do
100
98
# light or not
101
- for light in " " " Light"
102
- do
99
+ for light in " " " Light" ; do
103
100
if [ " ${light} " = " " ]; then
104
101
code=3
105
102
else
106
103
code=9
107
104
fi
108
105
# bold or not
109
- for bold in " " " Bold"
110
- do
106
+ for bold in " " " Bold" ; do
111
107
if [ " ${bold} " = " " ]; then
112
108
bCode=
113
109
else
114
110
bCode=' 1;'
115
111
fi
116
112
# underline or not
117
- for underLine in " " " UL"
118
- do
113
+ for underLine in " " " UL" ; do
119
114
{
120
115
echo " "
121
116
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)"
5
5
script=" ${dir} /../dist/ColorEcho.bash"
6
6
. " ${script} "
7
7
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
10
9
${x} " ${x} "
11
10
done
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ dir="$(cd "$(dirname "$_")" && pwd)"
5
5
script=" ${dir} /../dist/ColorEcho.sh"
6
6
. " ${script} "
7
7
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
10
9
${x} " ${x} "
11
10
done
You canβt perform that action at this time.
0 commit comments