1name = "Shell Script"
2code_fence_block_name = "bash"
3grammar = "bash"
4path_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"]
5line_comments = ["# "]
6first_line_pattern = '^#!.*\b(?:ash|bash|bats|dash|sh|zsh)\b'
7brackets = [
8 { start = "[", end = "]", close = true, newline = false },
9 { start = "(", end = ")", close = true, newline = true },
10 { start = "{", end = "}", close = true, newline = true },
11 { start = "\"", end = "\"", close = true, newline = false, not_in = ["comment", "string"] },
12 { start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
13 { start = "do", end = "done", close = false, newline = true, not_in = ["comment", "string"] },
14 { start = "then", end = "fi", close = false, newline = true, not_in = ["comment", "string"] },
15 { start = "then", end = "else", close = false, newline = true, not_in = ["comment", "string"] },
16 { start = "then", end = "elif", close = false, newline = true, not_in = ["comment", "string"] },
17 { start = "in", end = "esac", close = false, newline = true, not_in = ["comment", "string"] },
18]
19
20### WARN: the following is not working when you insert an `elif` just before an else
21### example: (^ is cursor after hitting enter)
22### ```
23### if true; then
24### foo
25### elif
26### ^
27### else
28### bar
29### fi
30### ```
31increase_indent_pattern = "(\\s*|;)(do|then|in|else|elif)\\b.*$"
32decrease_indent_pattern = "(\\s*|;)\\b(fi|done|esac|else|elif)\\b.*$"
33# make sure to test each line mode & block mode