mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
stdlib example
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
TEXT='Hi, there!'
|
||||
|
||||
echo: echo/normal echo/colors/red echo/indent
|
||||
echo: echo/normal echo/colors/red echo/colors/ansi-rainbow echo/indent
|
||||
|
||||
echo/normal:
|
||||
echo "$TEXT"
|
||||
@@ -8,5 +8,12 @@ echo/normal:
|
||||
echo/colors/red:
|
||||
echo "$TEXT" | red
|
||||
|
||||
echo/colors/ansi-rainbow:
|
||||
declare -a COLORS=('BLACK' 'WHITE' 'RED' 'GREEN' 'YELLOW' 'BLUE' 'PURPLE' 'CYAN')
|
||||
for COLOR in "${COLORS[@]}"; do
|
||||
echo "$TEXT" | bake_fg_color $COLOR
|
||||
done
|
||||
|
||||
|
||||
echo/indent:
|
||||
echo "$TEXT" | red | bake_indent '>'
|
||||
|
||||
Reference in New Issue
Block a user