bash: Fix bracket autoclose behavior (#29817)

Add `autoclose_before` configuration for Bash.

Closes #23627

Release Notes:

- Bash: Improved bracket autoclose behavior.
This commit is contained in:
Dan Bornstein 2025-05-05 07:02:27 -07:00 committed by GitHub
parent 5674b5cd4d
commit 1c44cabaea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ grammar = "bash"
path_suffixes = ["sh", "bash", "bashrc", "bash_profile", "bash_aliases", "bash_logout", "bats", "profile", "zsh", "zshrc", "zshenv", "zsh_profile", "zsh_aliases", "zsh_histfile", "zlogin", "zprofile", ".env", "PKGBUILD", "APKBUILD"] path_suffixes = ["sh", "bash", "bashrc", "bash_profile", "bash_aliases", "bash_logout", "bats", "profile", "zsh", "zshrc", "zshenv", "zsh_profile", "zsh_aliases", "zsh_histfile", "zlogin", "zprofile", ".env", "PKGBUILD", "APKBUILD"]
line_comments = ["# "] line_comments = ["# "]
first_line_pattern = '^#!.*\b(?:ash|bash|bats|dash|sh|zsh)\b' first_line_pattern = '^#!.*\b(?:ash|bash|bats|dash|sh|zsh)\b'
autoclose_before = "}])"
brackets = [ brackets = [
{ start = "[", end = "]", close = true, newline = false }, { start = "[", end = "]", close = true, newline = false },
{ start = "(", end = ")", close = true, newline = true }, { start = "(", end = ")", close = true, newline = true },