diff --git a/ShellScript/Bash.sublime-syntax b/ShellScript/Bash.sublime-syntax index f0de0e3b7b..bda7d3747a 100644 --- a/ShellScript/Bash.sublime-syntax +++ b/ShellScript/Bash.sublime-syntax @@ -249,6 +249,7 @@ contexts: def-function-end: - include: eoc-pop + - include: redirections - include: illegal-words ###[ VARIABLE DEFINITIONS ]#################################################### diff --git a/ShellScript/Bash/tests/syntax_test_scope.bash b/ShellScript/Bash/tests/syntax_test_scope.bash index 845c9f85b9..ef2a6e8e7e 100644 --- a/ShellScript/Bash/tests/syntax_test_scope.bash +++ b/ShellScript/Bash/tests/syntax_test_scope.bash @@ -2882,6 +2882,15 @@ function () ; {} arg # ^ meta.function.shell # ^^ meta.function.body.shell meta.block.shell + func () {} >&2 # comment +#^ source.shell - meta.function +# ^^^^^ meta.function.identifier.shell +# ^^ meta.function.parameters.shell +# ^ meta.function.shell +# ^^ meta.function.body.shell meta.block.shell +# ^^^ meta.redirection.shell +# ^^^^^^^^^^ comment.line.number-sign.shell + func () {} rest # comment #^ source.shell - meta.function # ^^^^^ meta.function.identifier.shell