runtime(sh): Update syntax, highlight escaped chars in test expressions
Highlight escape characters in unquoted test expression operands.
E.g., [[ foo == \[bar\] ]]
fixes #17221
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/testdir/input/sh_14.sh b/runtime/syntax/testdir/input/sh_14.sh
new file mode 100644
index 0000000..bfa3d93
--- /dev/null
+++ b/runtime/syntax/testdir/input/sh_14.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+# Issue #17221 (sh syntax: escaped square brackets don't work in [[ ]])
+
+[[ foo == [bar] ]]
+[[ foo == \[bar\] ]]
+
+echo [foo]
+echo \[foo\]