diff options
-rwxr-xr-x | kiss | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -14,6 +14,11 @@ log() { # Print a message prettily. + # '\033[1;32m': Set text to color '2' and make it bold. + # '\033[m': Reset text formatting. + # '${3:-->}': If the 3rd argument is missing, set prefix to '->'. + # '${2:+[1;33m}': If the 2nd argument exists, set the text style of '$1'. + # '${2:+[m}': If the 2nd argument exists, reset text formatting. printf '\033[1;32m%s \033[m%s\033[m %s\n' \ "${3:-->}" "${2:+[1;33m}$1${2:+[m}" "$2" } |