diff --git a/.local/bin/no-ansi b/.local/bin/no-ansi index b544661..46f54d8 100755 --- a/.local/bin/no-ansi +++ b/.local/bin/no-ansi @@ -4,4 +4,4 @@ # # Remove ANSI escape sequences. -env LC_ALL=C sed 's/\[[0-?]*[ -/]*[@-~]//g' +env LC_ALL=C sed "$(printf 's/\033\\[[0-?]*[ -/]*[@-~]//g')" diff --git a/.local/bin/no-ansi-sgr b/.local/bin/no-ansi-sgr index fdf8892..d8d6f38 100755 --- a/.local/bin/no-ansi-sgr +++ b/.local/bin/no-ansi-sgr @@ -5,4 +5,4 @@ # Remove ANSI SGR (Select Graphic Rendition) escape sequences, e.g. setting # color or bold font. -env LC_ALL=C sed 's/\[[0-?]*[ -/]*m//g' +env LC_ALL=C sed "$(printf 's/\033\\[[0-?]*[ -/]*m//g')"