PreviousNextTracker indexSee it online !

(95/211) 3651 - syntax highlight in shell script #!/bin/sh is not correct

Hi,

I have found some issue with syntax highlighting for shell script/s.
Jedit 4.5 , java 64bit sdk version 1.7.0_02 , ubuntu 11.10 64 bit.

1. problem:
It is hghlighting on magenta color even if it is not text
I have attached file to exam. Line 42 and following appeared wrongly highlighted.
If I added one single quotation mark at the end - syntax highlighting is correct (but shell syntax not).

2. problem , line 1440
this block
cat <<\\\\_ACEOF
...
_ACEOF
is wrongly highlighted which makes the rest of file wrongly highlighted as well.

I compared attached script as example with editor Kate where it is correctly highlighted.

Regards,
Martin

Submitted masuch2 - 2012-02-15 16:57:57 Assigned
Priority 5 Labels
Status open Group None
Resolution None

Comments

2012-02-15 16:58:01
masuch2

a.sh.tar.gz (61.6Kio)

2012-04-27 12:17:53
kpouer

Hi, this is jEdit's bug not plugin.
I'm not sure about your syntax

you do:

cat <<\\\\_ACEOF
...
_ACEOF

If you remove the \\\ it seems it works, I'm not a shellscript expert but what is the difference with the syntax
cat <<_ACEOF
...
_ACEOF

is this one invalid ?

2012-05-05 16:41:53
masuch2

OK,

cat <<\\\ACEOF is quite NOT important.

-----------------------------
\!\!\! The most important is double quotes syntax highlighting \!\!\!

for example following code is as well wrongly highlighted:
echo "------ initctl list|grep $SERVICE"
initctl list|grep ${SERVICE}"
RETVAL=$?
if \[ -z "${RETVAL}" \]; then

2012-05-05 16:49:14
masuch2

Sorry, just ignore my previous example - wrong copy / paste.