First commit
This commit is contained in:
commit
e1f41d37fa
3 changed files with 121 additions and 0 deletions
32
README.md
Normal file
32
README.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
BASH message display library
|
||||
----------------------------
|
||||
|
||||
A simple library for display text (bold, underline, color) on screen. I use it
|
||||
for my script to make output more eye candy.
|
||||
|
||||
## Quick example
|
||||
|
||||
```bash
|
||||
#import library
|
||||
source /message/message.sh
|
||||
|
||||
#call msg()
|
||||
msg "green" "This is a **formated** message"
|
||||
```
|
||||
|
||||
## more function
|
||||
|
||||
This little library contain some helper function with pre-selected color. These
|
||||
function automaticaly add `\n` caracter at the end of the message.
|
||||
|
||||
* `error()` : display message in red with ERROR: before the text.If variable
|
||||
`EXIT_ON_ERROR` equal 1, calling this function terminate the script with
|
||||
`$ERROR_CODE`
|
||||
* `warning()` : display message in yellow with WARNING: before the text
|
||||
* `debu()` : display message only if `DEBUG` variable contain `1`, color is
|
||||
cyan and display DEBUG: before message
|
||||
|
||||
## Licence
|
||||
|
||||
Do what you want and feel free to send me a message or offer me a beer if you
|
||||
come near Bordeaux - France.
|
Reference in a new issue