Skip to content

Commit 6430fcf

Browse files
add echo.Rainbow, which relys on lolcat
1 parent 7b0731d commit 6430fcf

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Make echo colorful with easier method. In [bash](https://www.gnu.org/software/ba
2929

3030
* See [color table](https://cdn.rawgit.com/PeterDaveHello/ColorEchoForShell/master/table.txt)
3131

32+
## Notes
33+
34+
* If you have [lolcat](https://github.com/busyloop/lolcat), you can also try `echo.Rainbow`.
35+
3236
## Screenshot
3337

3438
![Screenshot](https://cdn.rawgit.com/PeterDaveHello/ColorEchoForShell/master/Demo.png)

β€Ždist/colorEcho.shβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,11 @@ function echo.LightBoldULCyan()
239239
{
240240
echo -e "\e[4;1;96m$@\e[m"
241241
}
242+
function echo.Rainbow()
243+
{
244+
if [ "type lolcat" ]; then
245+
echo "$@" | lolcat
246+
else
247+
echo "$@"
248+
fi
249+
}

β€Žgen.shβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,14 @@ do
3737
done
3838
done
3939
done
40+
41+
cat << LOLCAT >> "$dist"
42+
function echo.Rainbow()
43+
{
44+
if [ "type lolcat" ]; then
45+
echo "\$@" | lolcat
46+
else
47+
echo "\$@"
48+
fi
49+
}
50+
LOLCAT

0 commit comments

Comments
Β (0)