$ cat /etc/init.d/console-screen.kbd.sh
1 #!/bin/sh
[some comments snipped..]
17 PKG=kbd
18 if [ -r /etc/$PKG/config ]; then
19 . /etc/$PKG/config
20 fi
21
22 if [ -d /etc/$PKG/config.d ]; then
23 for i in `run-parts --list /etc/$PKG/config.d `; do
24 . $i
25 done
26 fi
27
28 # do some magic with the variables for compatibility with the config
29 # file of console-tools
30 for vc in '' `set | grep "^.*_vc[0-9][0-9]*=" | sed
's/^.*\(_vc[0-9][0-9]*\)=.*/\1/'`
31 ..
[..]
Syntax highlighting after line 30. colors the rest of the script mostly
red - which I understand is the color used to highlight a syntax error,
but the script executes without any problems.
I believe I am using the "default" color scheme on an xterm with a black
background.
It seems things start to go wrong just after the "for vc in" statement
so it looks like either the two single quotes followed by a back quote
or possibly, the regex following the "grep" is causing the problem.
Or maybe it is the bash + sed syntax mix?
I have seen some issues with back quotes, though nothing conclusive, and
I was wondering if the $VIMRUNTIME/syntax/sh.vim maintainer was aware of
this issue?
Maybe it has been addressed or circumvented in a more recent version of
the syntax file?
Or if this is caused by a "syntax mix", is there a way to tell vim not
to report this type of error?
I'm attaching a clean copy of the entire script to this message.
Gen-Paul.
I had downloaded the latest version of the syntax file before I posted
and indeed it doesn't make any difference.
I guess I can always send him an email to his contact address in sh.vim
if he does not respond within the next few days.
Where this particular linux init.d script is concerned, and especially
since the line that's affected is very near the beginning, it pretty
much defeats the purpose of syntax highlighting - as time allows, I'm
sure he will want to come up with a fix.
Gen-Paul.