Version: (using KDE 4.4.3) OS: Linux Installed from: Debian testing/unstable Packages Kate told me this is wrong with his colors: if [ "v:`grep \"New passwords don't match\" /tmp/afdasyf12312`" == 'v:' ];then echo "error"; fi Kate understood the character "'" of "don't" need be escaped, and all linex afer this line appears in red. But that line is correct! if I escape "'" the script will be wrong. But Kate/Kwrite do not understood this.
Hmm... I guess I don't understand bash's parsing here. I thought that ` would reset the quote level (which is what the HL thinks happens), but it seems not. I'm actually inclined to wonder if this is a bash bug. For what it's worth, if you don't escape the double-quotes (like so): if [ "v:`grep "New passwords don't match" /tmp/afdasyf12312`" == 'v:' ] ...it should be parsed the same by bash, and parsed correctly by kate's HL.
Eric Blake pointed out that POSIX specifies that "'s inside ``'s should be (must be, actually) escaped. So a) bash is correct, and b) this does need to be fixed for kate. Also I guess that makes my work-around of dubious value, depending on what shells that scripts needs to be portable to. (Although Eric notes that the only fully-portable solution is to not use such a construct.) (See http://permalink.gmane.org/gmane.comp.shells.bash.bugs/14831 and rest of thread.)
Sorry for time to back here. Hundreds of bug reports and I lost some of them in my e-mails... I'm a little confuse for now. Then "s inside `s do not cancel external "s, correct? And really, your workaround worked for me in bash, but not in sh (where I got "[: 4: v:New passwords don't match: unexpected operator" message.
All highlightings are just heuristics, they can't cover all corner cases and often lack latest language features. If you provide some patch to fix your issue, we will take care of it, otherwise, it won't be fixed as the xml files are not that "actively" maintained beside by users fixing such issues themself. See the highlighting docs on kate-editor.org on how to improve our existing files. As we have >> 200 highlightings around, we can't do this ourself, sorry. Please provide a patch and reopen the bug then (or dump the patch to kwrite-devel@kde.org).