Bug 460301 - Highlighting indicates error in correct Bash's coproc statement
Summary: Highlighting indicates error in correct Bash's coproc statement
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: 5.98.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-12 12:18 UTC by Thomas Fischer
Modified: 2022-10-16 15:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fischer 2022-10-12 12:18:32 UTC
The following text is correct Bash code:

coproc { ls thisfiledoesntexist; read; } 2>&1

Syntax highlighting for Bash, however, indicates that the closing curly bracket (after "read;", before "2) is wrong.

Example on coproc taken from https://wiki.bash-hackers.org/syntax/keywords/coproc
Comment 1 Bug Janitor Service 2022-10-16 00:34:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/369
Comment 2 Christoph Cullmann 2022-10-16 15:59:16 UTC
Git commit 064930cbfb3c6d6b506c45e9bfad5c350106eaf5 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 16/10/2022 at 15:50.
Pushed by cullmann into branch 'master'.

Bash/Zsh: fix group command with coproc statement

M  +5    -0    autotests/folding/highlight.sh.fold
M  +4    -0    autotests/folding/test.zsh.fold
M  +5    -0    autotests/html/highlight.sh.dark.html
M  +5    -0    autotests/html/highlight.sh.html
M  +4    -0    autotests/html/test.zsh.dark.html
M  +4    -0    autotests/html/test.zsh.html
M  +5    -0    autotests/input/highlight.sh
M  +4    -0    autotests/input/test.zsh
M  +5    -0    autotests/reference/highlight.sh.ref
M  +4    -0    autotests/reference/test.zsh.ref
M  +14   -1    data/syntax/bash.xml
M  +2    -1    data/syntax/zsh.xml

https://invent.kde.org/frameworks/syntax-highlighting/commit/064930cbfb3c6d6b506c45e9bfad5c350106eaf5