Summary: | error in bash syntax highlighting | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Saulo Toledo <saulotoledo> |
Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | normal | CC: | cullmann |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Saulo Toledo
2010-05-14 22:51:38 UTC
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). |