ptgdp: Remove prefix on log lines

This commit is contained in:
Salt 2019-09-18 02:28:44 -05:00
parent 6a3a4f9732
commit 22fb9cebb3

6
ptgdp
View File

@ -28,15 +28,13 @@ declare p_search="ytsearch:"
# Helper functions
log() {
[ -z "$1" ] && return 1 # Message body
printf "%s: %s\\n" \
"$_name" \
printf "%s\\n" \
"$1"
}
error() {
[ -z "$1" ] && return 1 # Message body
# 2: Exit code
printf "%s: \\e[31m%s\\e[0m\\n" \
"$_name" \
printf "\\e[31m%s\\e[0m\\n" \
"$1"
[ -n "$2" ] && exit "${2:-1}"
}