Skip to content

Commit f5da511

Browse files
committed
feat: add message helpers
1 parent 6711bf0 commit f5da511

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tusc.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@
77
#
88
# Be sure to check readme doc at https://github.com/adhocore/bash-tus
99
#
10+
11+
# message helpers
12+
line() { echo -e "\e[${3:-0};$2m$1\e[0m"; }
13+
error() { line "$1" 31; if [[ ! ${2:-0} -eq 0 ]]; then exit $2; fi }
14+
ok() { line "${1:- Done}" 32; }
15+
info() { line "$1" 33; }
16+
comment() { line "$1" 30 1; }

0 commit comments

Comments
 (0)