Skip to content

Commit 8d0e7bb

Browse files
Allow to exchange the order of style in function name
1 parent d6ab10b commit 8d0e7bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€ŽREADME.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ Please note that [certain colors](https://github.com/PeterDaveHello/ColorEchoFor
3131

3232
## Usage
3333

34-
* echo.`StyleColor` (if you are using `ksh`/`sh`, there is no `.` dot symbol)
34+
* echo.`StyleColor` (if you are using `ksh`/`sh`, there is no `.` dot symbol), you can combine at most two styles together, the order of the style doesn't matter.
3535

3636
### Examples
3737

3838
* echo.Cyan
3939
* echo.ULCyan
4040
* echo.BoldCyan
4141
* echo.BoldULCyan
42+
* echo.ULBoldCyan
4243

4344
## Supported shells
4445

β€Žgenerator.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ SH_ECHO
147147
finalStyleCode="${styleCode}"
148148
fi
149149
echoFunction="$(printf "%secho%s%s%s%s%s" "${fn}" "${dot}" "${light}" "${style}" "${style2}" "${color}")"
150-
echoFunctionShuffle="$(printf "%secho%s%s%s%s%s" "${fn}" "${dot}" "${light}" "${style2}" "${style}" "${color}")"
151-
if ! ( grep -q "${echoFunction}" "${tempDist}" || grep -q "${echoFunctionShuffle}" "${tempDist}") ; then
150+
if ! grep -q "${echoFunction}" "${tempDist}"; then
152151
{
153152
echo ""
154153
printf "%s%s" "${echoFunction}" "${brackets}"

0 commit comments

Comments
Β (0)