sh.zio.backup: fix Bash colors fucking things up
parent
ed591f8641
commit
5f58607a4e
|
@ -193,7 +193,7 @@ function invoke_script() {
|
|||
function trigger_notify() {
|
||||
level="$1"
|
||||
title="$2"
|
||||
output="$(echo "$3" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")"
|
||||
output="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")"
|
||||
#output="yo"
|
||||
notify_prog="/usr/local/bin/sh.zio.notify"
|
||||
|
||||
|
@ -204,10 +204,8 @@ function trigger_notify() {
|
|||
else
|
||||
/usr/local/bin/sh.zio.notify \
|
||||
--level "$level" \
|
||||
--message "$output" \
|
||||
--message '```\\n'"${output//$'\n'/'\\n'}"'\\n```' \
|
||||
--title "$title"
|
||||
|
||||
#--message '```\\n'"${output//$'\n'/'\\n'}"'\\n```' \
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue