tools: bootconfig: Regex brackets need escape
Subsystems (2)
PATCH 1/1 tools: bootconfig: Regex brackets need escape
It was showing malformed syntax colors below those lines,escaping the posix class brackets bring back the syntatic reference back.
Oh, malformed syntax colors means,(in a editor,in this case Vim, where syntax highlight is on). In essence, it might complain while running the script.
Hence, this trivialities.
--- tools/bootconfig/test-bootconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/bootconfig/test-bootconfig.sh +2 -2
@@ -167,8 +167,8 @@ echo > $INITRD xpass $BOOTCONF -a $TEMPCONF $INITRD $BOOTCONF $INITRD > $OUTFILE -xfail grep -q val[[:space:]] $OUTFILE -xpass grep -q val2[[:space:]] $OUTFILE +xfail grep -q val\[\[:space:\]\] $OUTFILE +xpass grep -q val2\[\[:space:\]\] $OUTFILE echo "=== expected failure cases ===" for i in samples/bad-* ; do
--
2.49.0
Masami Hiramatsu (Google)
maintainerHi Bhaskar,
Quoted 5 lines · On Tue, 8 Jul 2025 14:46:08 +0530 Bhaskar Chowdhury <[email protected]>…
It was showing malformed syntax colors below those lines,escaping the posix class brackets bring back the syntatic reference back.
Oh, malformed syntax colors means,(in a editor,in this case Vim, where syntax highlight is on). In essence, it might complain while running the script.
Hmm, that means your editor's parser's bug, right?
Quoted 13 lines
Hence, this trivialities.
Signed-off-by Bhaskar Chowdhury <[email protected]>--- tools/bootconfig/test-bootconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/bootconfig/test-bootconfig.sh +0
-0
tools/bootconfig/test-bootconfig.sh echo > $INITRD · line 171
Quoted 7 lines
tools/bootconfig/test-bootconfig.sh +2
-2@@ -167,8 +167,8 @@ echo > $INITRD xpass $BOOTCONF -a $TEMPCONF $INITRD $BOOTCONF $INITRD > $OUTFILE -xfail grep -q val[[:space:]] $OUTFILE -xpass grep -q val2[[:space:]] $OUTFILE +xfail grep -q val\[\[:space:\]\] $OUTFILE +xpass grep -q val2\[\[:space:\]\] $OUTFILE
Can you escape it by quotations? In that case, it is acceptable as a cleanup. e.g. 'val[[:space:]]'.
Thank you,
Quoted 6 lines
tools/bootconfig/test-bootconfig.sh +0
-1echo "=== expected failure cases ===" for i in samples/bad-* ; do --2.49.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Quoted 27 lines · Masami Hiramatsu
Hi Bhaskar,
Quoted 5 lines · On Tue, 8 Jul 2025 14:46:08 +0530 Bhaskar Chowdhury <[email protected]>…
It was showing malformed syntax colors below those lines,escaping the posix class brackets bring back the syntatic reference back.
Oh, malformed syntax colors means,(in a editor,in this case Vim, where syntax highlight is on). In essence, it might complain while running the script.
Hmm, that means your editor's parser's bug, right?
Quoted 14 lines
Hence, this trivialities.
Signed-off-by Bhaskar Chowdhury <[email protected]>--- tools/bootconfig/test-bootconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/bootconfig/test-bootconfig.sh +0
-0@@ -167,8 +167,8 @@ echo > $INITRD
Quoted 10 lines
tools/bootconfig/test-bootconfig.sh echo > $INITRD · line 171
Quoted 6 lines
tools/bootconfig/test-bootconfig.sh +2
-2xpass $BOOTCONF -a $TEMPCONF $INITRD $BOOTCONF $INITRD > $OUTFILE -xfail grep -q val[[:space:]] $OUTFILE -xpass grep -q val2[[:space:]] $OUTFILE +xfail grep -q val\[\[:space:\]\] $OUTFILE +xpass grep -q val2\[\[:space:\]\] $OUTFILECan you escape it by quotations? In that case, it is acceptable as a cleanup. e.g. 'val[[:space:]]'.
Yup...looks sane with quotation....sending you V2 in a while.
Quoted 11 lines
Thank you,
Quoted 6 lines
tools/bootconfig/test-bootconfig.sh +0
-1echo "=== expected failure cases ===" for i in samples/bad-* ; do --2.49.0
Quoted 2 lines
--
Masami Hiramatsu (Google) <[email protected]>
--
Thanks,
Bhaskar
"Here's looking at you kid"-- Casablanca
https://about.me/unixbhaskar