ptgdp: Remove prefix on log lines
This commit is contained in:
parent
6a3a4f9732
commit
22fb9cebb3
6
ptgdp
6
ptgdp
@ -28,15 +28,13 @@ declare p_search="ytsearch:"
|
|||||||
# Helper functions
|
# Helper functions
|
||||||
log() {
|
log() {
|
||||||
[ -z "$1" ] && return 1 # Message body
|
[ -z "$1" ] && return 1 # Message body
|
||||||
printf "%s: %s\\n" \
|
printf "%s\\n" \
|
||||||
"$_name" \
|
|
||||||
"$1"
|
"$1"
|
||||||
}
|
}
|
||||||
error() {
|
error() {
|
||||||
[ -z "$1" ] && return 1 # Message body
|
[ -z "$1" ] && return 1 # Message body
|
||||||
# 2: Exit code
|
# 2: Exit code
|
||||||
printf "%s: \\e[31m%s\\e[0m\\n" \
|
printf "\\e[31m%s\\e[0m\\n" \
|
||||||
"$_name" \
|
|
||||||
"$1"
|
"$1"
|
||||||
[ -n "$2" ] && exit "${2:-1}"
|
[ -n "$2" ] && exit "${2:-1}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user