From 3ef4a3ca051a0d445b300d13fa86bc31b3c8c9e0 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 12 Jul 2022 21:13:24 +0200 Subject: filters: try and make awk scripts posix compliant \x escape sequences are GNU specific. Use the octal escape code instead. filters/calendar is beyond help. It would need a complete rewrite to make it work with POSIX awk. Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- filters/colorize | 26 +++++++++++++------------- filters/plaintext | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'filters') diff --git a/filters/colorize b/filters/colorize index 5fad883e..322caa46 100755 --- a/filters/colorize +++ b/filters/colorize @@ -3,19 +3,19 @@ BEGIN { # R;G;B colors - url = "\x1b[38;2;255;255;175m" # yellow - header = "\x1b[38;2;175;135;255m" # purple - signature = "\x1b[38;2;175;135;255m" # purple - diff_meta = "\x1b[1;38;2;255;255;255m" # bold white - diff_chunk = "\x1b[38;205;0;205m" # cyan - diff_add = "\x1b[38;2;0;205;0m" # green - diff_del = "\x1b[38;2;205;0;0m" # red - quote_1 = "\x1b[38;2;95;175;255m" # blue - quote_2 = "\x1b[38;2;255;135;0m" # orange - quote_3 = "\x1b[38;2;175;135;255m" # purple - quote_4 = "\x1b[38;2;255;95;215m" # pink - quote_x = "\x1b[38;2;128;128;128m" # gray - reset = "\x1b[0m" + url = "\033[38;2;255;255;175m" # yellow + header = "\033[38;2;175;135;255m" # purple + signature = "\033[38;2;175;135;255m" # purple + diff_meta = "\033[1;38;2;255;255;255m" # bold white + diff_chunk = "\033[38;205;0;205m" # cyan + diff_add = "\033[38;2;0;205;0m" # green + diff_del = "\033[38;2;205;0;0m" # red + quote_1 = "\033[38;2;95;175;255m" # blue + quote_2 = "\033[38;2;255;135;0m" # orange + quote_3 = "\033[38;2;175;135;255m" # purple + quote_4 = "\033[38;2;255;95;215m" # pink + quote_x = "\033[38;2;128;128;128m" # gray + reset = "\033[0m" # state in_diff = 0 in_signature = 0 diff --git a/filters/plaintext b/filters/plaintext index 922ae7c7..aa22eb70 100755 --- a/filters/plaintext +++ b/filters/plaintext @@ -1,9 +1,9 @@ #!/usr/bin/awk -f BEGIN { - dim = "\x1B[2m" - cyan = "\x1B[36m" - reset = "\x1B[0m" + dim = "\033[2m" + cyan = "\033[36m" + reset = "\033[0m" } { # Strip carriage returns from line -- cgit