Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1605 Redirection causes brace matching to not complete with bash script

Bug
closed-fixed
Neil Hodgson
5
2014-07-04
2014-05-28
James Toebes
No

Using Notepad++ 6.6.3. In the following code segment, the <<< on read prevents the { } from matching. <<< is used to read a string into an array.

quick_menu ()
{
declare -a qm_choices
read -a qm_choices <<< "$2"
return $?
}

1 Attachments

Discussion

  • Kein-Hong Man
    Kein-Hong Man
    2014-05-28

    Missing handling for <<< operator. Once <<< is handled as an operator, brace matching should work again. I guess it came in bash version >=3, I prepared test cases a long time ago using bash version 2.x. I will take a look at this over the weekend.

     
  • Neil Hodgson
    Neil Hodgson
    2014-05-31

    • labels: --> scintilla, shell
    • status: open --> open-accepted
     
  • Kein-Hong Man
    Kein-Hong Man
    2014-06-01

    My bad, it is already an operator, heh heh. I see it in my test cases but did limited fold testing... :-P Anyway, here is the patch. The patch looks more complicated than merely an extra '<<<' test because at the next iteration I needed to avoid matching the 2nd and 3rd '<' as a '<<'.

     
    Attachments
  • Neil Hodgson
    Neil Hodgson
    2014-06-01

    Committed fix as [32194d].

     

    Related

    Commit: [32194d]

  • Neil Hodgson
    Neil Hodgson
    2014-06-01

    • status: open-accepted --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson
    Neil Hodgson
    2014-07-04

    • status: open-fixed --> closed-fixed