POSIX compatibility fix: sed -r => sed -E

This commit is contained in:
Stéphane Lesimple
2026-03-30 20:24:04 +02:00
parent b8477d0e4d
commit cd79597e9a
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ _pr_echo_raw() {
interpret_chars='-e'
fi
ctrlchar=$($g_echo_cmd $interpret_chars "\033")
msg=$($g_echo_cmd $interpret_chars "$msg" | sed -r "s/$ctrlchar\[([0-9][0-9]?(;[0-9][0-9]?)?)?m//g")
msg=$($g_echo_cmd $interpret_chars "$msg" | sed -E "s/$ctrlchar\[([0-9][0-9]?(;[0-9][0-9]?)?)?m//g")
fi
if [ "$g_echo_cmd_type" = printf ]; then
if [ "$opt" = "-n" ]; then