]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(sh): Do not conflate empty array and function declarations in Bash
authorAliaksei Budavei <0x000c70@gmail.com>
Sun, 17 May 2026 18:05:13 +0000 (18:05 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 17 May 2026 18:06:22 +0000 (18:06 +0000)
commit23c77d8ec8c8e8f35b2301648c9c1727ebcefedf
treef5533cb1d09079f1ed4a59c1982de8d21d766ae1
parentf0e874a129a702457a383017b576eef1553f95d8
runtime(sh): Do not conflate empty array and function declarations in Bash

Although the "=" character is permitted in function names,
a construct that parses as a variable assignment is
preferred to it parsing as a function declaration.  See the
updated test file "sh_functions_bash.sh" for details.

fixes:  #20183
closes: #20205

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/sh.vim
runtime/syntax/testdir/dumps/sh_functions_bash_01.dump
runtime/syntax/testdir/dumps/sh_functions_bash_02.dump
runtime/syntax/testdir/dumps/sh_functions_bash_03.dump
runtime/syntax/testdir/dumps/sh_functions_bash_04.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/sh_functions_bash_05.dump [new file with mode: 0644]
runtime/syntax/testdir/input/sh_functions_bash.sh