colored echo
cecho - Write arguments to the standard output.
Usage
Usage:
cecho [-nISWEBUC] [-fb color] [-u url] [-H|-h cols] [-V|-v cols] [arg ...]
Options:
-n do not append a newline
-I info is light cyan text
-S success is green text
-W warning is yellow text
-E error is red text
-B bold text
-U underlined text
-C clear to end of line with background color
-f <color> set foreground color
-b <color> set background color
-u <url> set hyperlink url
-H | -h <cols> draw text frame horizontal line
-V | -v <cols> draw text surrounded by text frame
Color:
black red green yellow blue magenta cyan white
Example
Colored Text
cecho -I -- information message
cecho -S -- success message
cecho -W -- warning message
cecho -E -b white -C -- 'failure message with `-C`(clear to end of line with background color)'
cecho -B -- bold text
cecho -U -- underline text
cecho -B -f red -b yellow -- foreground: red, backgroud: yellow
cecho -n "Hyperlinks in terminal: "; cecho -u https://github.com/yanminhui bryan
cecho -- # blank row
CMAKE_VER=3.0.2
cecho -C -f cyan -b white << _EOF_
TDLib depends on:
- C++14 compatible compiler
- OpenSSL
- zlib
- gperf (build only)
- CMake (${CMAKE_VER}+, build only)
- PHP (optional, for documentation generation)
_EOF_
Text Frame
declare -r CMAKE_VER=3.0.2
# text frame top line
cecho -H -I -b white
while IFS= read -r CURR_LINE; do
cecho -V -I -b white -- "$CURR_LINE"
done <<- _EOF_
$(hyperlink https://github.com/tdlib/td TDLib) depends on:
- $(setaf warn)C++14 compatible compiler$(setaf info)
- OpenSSL
- zlib
- $(setaf red)gperf (build only)$(setaf info)
- CMake (${CMAKE_VER}+, build only)
- PHP (optional, for documentation generation)
_EOF_
# text frame bottomline
cecho -H -I -b white