aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-22 17:01:18 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-22 17:01:18 +0000
commit6678bbce7a9097eb08f5760f82a87fdfe87b8eee (patch)
treeb640e689c991ed94c057fe5da778d9667d499321
parentc70c7f2e91cf571c4fa5bfea07f1f9ffe92a9d02 (diff)
parentf77a4ca9051228c096f0d55227c7ce0732cb2c7c (diff)
downloadcpt-6678bbce7a9097eb08f5760f82a87fdfe87b8eee.tar.gz
Merge branch 'master' of github.com:kissx/kiss
FossilOrigin-Name: 9e25040dd928d30676626a541db14c432ac77f5732ff74c04c647b9c66d42c4c
-rwxr-xr-xkiss18
1 files changed, 7 insertions, 11 deletions
diff --git a/kiss b/kiss
index 60426ee..676a49c 100755
--- a/kiss
+++ b/kiss
@@ -15,17 +15,13 @@
log() {
# Print a message prettily.
#
- # This function uses the literal escape character (Ctrl+V+Escape) as
- # a simple way of *safely* bypassing the escape sequence restrictions
- # on 'printf %s'. Cheeky, I know.
- #
- # '\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;3Xm}': If the 2nd argument exists, set the text style of '$1'.
- # '${2:+[m}': If the 2nd argument exists, reset text formatting.
- printf '\033[1;33m%s \033[m%s\033[m %s\n' \
- "${3:-->}" "${2:+}$1${2:+}" "$2"
+ # '\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:+\033[1;3Xm}': If the 2nd argument exists, set text style of '$1'.
+ # '${2:+\033[m}': If the 2nd argument exists, reset text formatting.
+ printf '\033[1;33m%s \033[m%b%s\033[m %s\n' \
+ "${3:-->}" "${2:+\033[1;36m}" "$1" "$2"
}
die() {