ax-common.sh: Correctly quote printf statement
authorAlexander Barton <alex@barton.de>
Thu, 19 Apr 2018 10:17:34 +0000 (12:17 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 19 Apr 2018 10:17:34 +0000 (12:17 +0200)
This fixes the following shellcheck(1) warning SC1117:
  Backslash is literal in "\0". Prefer explicit escaping: "\\0".

lib/ax/ax-common.sh

index c0362ffd755e282c3435910c534b5371622bf93b..f43e475ed14e4b1ae0909a1883f9d4b3b69a2f2d 100644 (file)
@@ -29,7 +29,7 @@ ax_msg1() {
                        *)      c="0";
                esac
                # print colored word(s):
-               printf "\033[0;%sm%s\033[0m " "${c}" "${1}"
+               printf "\\033[0;%sm%s\\033[0m " "${c}" "${1}"
        else
                # print plain text:
                printf "%s " "${1}"