#281 problem with Sh Ksh Bash preference

closed-fixed
None
5
2003-12-07
2003-07-14
Anonymous
No

I am new with Nedit, however I cannot configure it so
it displays
correct colors and fonts with the following correct
script, when
preferences are set to Sh Ksh Bash : starting with the
8 line,
all the text is reverted to the blue color until end of
script.
So I am unable to check the syntax for it.

Don't really know if this is a bug, or if I am wrong
somewhere.

Version :
NEdit 5.3
Jun 1, 2002

Built on: IRIX, MIPS, SGI MipsPro
Built at: Dec 3 2002, 18:14:09
With Motif: 1002 [@(#)OSF/Motif Version 1.2.4]
Running Motif: 1002
Server: The XFree86 Project, Inc 40200000

Running on a SGI Origin 3800, IRIX 6.5.20f.

The script production this Nedit behaviour is attached
in this
mail.
====================================================
JM Chenais SIC/SE-EPFL
Origin 3000 SGI/Irix sysadmin - System and
Administration Group
Service Informatique Central - SIC-EPFL Computing Center

Swiss Federal Institute of Technology of Lausanne
CH - 1015 Ecublens - Switzerland http://sic.epfl.ch
E-mail : jean-michel.chenais@epfl.ch
#-----------------------------------------------------------------------

Discussion

  • script production example

     
    Attachments
  • Eddy De Greef
    Eddy De Greef
    2003-07-14

    Logged In: YES
    user_id=73597

    I guess you can call it a bug.
    The Sh Ksh Bash syntax highlighting patterns currently don't
    work very well with nested constructs (such as a string
    inside a subshell) and get confused.
    In your case, you can work around it by replacing
    LIST_OF_FILE_SYSTEMS="
    by
    LIST_OF_FILE_SYSTEMS=.
    The matching pattern will probably still be selective enough.

    [Reclassified as a bug]

     
  • Logged In: NO

    OK, thanks for the answer. I can understand that Nedit may
    get it wrong
    in certain circumtances.

    Unfortunately, the work-around you suggest does not apply in
    my case :
    the " is really part of the matching pattern; FYI, I could
    find the following
    work-around : (using the awk /start/, /stop/ patterns with
    an additionnal awk)

    read REP?"--> selected file-systems for full dump are : $(
    /bin/awk /LIST_OF_FILE_SYSTEMS="/, /LIST_OF_FILE_SYSTEMS="/
    ${WRK_DIR}/dump.${MODE}.sh_COPY | /bin/awk -F'=' '{print
    $2}' ), OK ? [y/n] "

    Also FYI, emacs get the same problem with the original
    script, but
    all look to work fine with (the latest) gvim version on Linux.

    Regards,
    JM Chenais SIC/SE-EPFL

     
  • Thorsten Haude
    Thorsten Haude
    2003-11-07

    • assigned_to: nobody --> yooden
     
  • Thorsten Haude
    Thorsten Haude
    2003-11-07

    Prototype Shell Pattern Set 2.2

     
    Attachments
  • Thorsten Haude
    Thorsten Haude
    2003-11-07

    Logged In: YES
    user_id=119143

    Please check the attached file. It contains a new set of
    shell patterns and should fix the problem. If you see the
    same error, please let me know. If you see a different
    error, I would be grateful for a screenshot of the relevant
    parts.

    To load the file, use the -import command:
    nedit -import shell.2.2.pats

    If you like the result, you can save your preferences and
    the new set will be saved along with your regular preferences.

     
  • Thorsten Haude
    Thorsten Haude
    2003-12-07

    • status: open --> closed-fixed