2
0
Fork 0

sh.zio.backup: fix Bash colors fucking things up

main
Ducky 2024-04-01 21:44:10 +01:00
parent ed591f8641
commit 5f58607a4e
1 changed files with 2 additions and 4 deletions

View File

@ -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
}