mirror of
https://github.com/HiPhish/rainbow-delimiters.nvim.git
synced 2024-09-16 14:24:05 +02:00
feat(bash): add additional queries
* function definition and function body * array * subscript (array index) * arithmetic expression
This commit is contained in:
parent
47404636a3
commit
84fc4babdc
2 changed files with 30 additions and 0 deletions
|
@ -15,3 +15,23 @@
|
|||
(subshell
|
||||
"(" @delimiter
|
||||
")" @delimiter @sentinel) @container
|
||||
|
||||
(array
|
||||
"(" @delimiter
|
||||
")" @delimiter @sentinel) @container
|
||||
|
||||
(function_definition
|
||||
"(" @delimiter
|
||||
")" @delimiter @sentinel) @container
|
||||
|
||||
(arithmetic_expansion
|
||||
"$((" @delimiter
|
||||
"))" @delimiter @sentinel) @container
|
||||
|
||||
(compound_statement
|
||||
"{" @delimiter
|
||||
"}" @delimiter @sentinel) @container
|
||||
|
||||
(subscript
|
||||
"[" @delimiter
|
||||
"]" @delimiter @sentinel) @container
|
||||
|
|
|
@ -18,3 +18,13 @@ fi
|
|||
|
||||
# Sub-shells
|
||||
(true; false; (true; true; (false; true)))
|
||||
|
||||
person() {
|
||||
array=(
|
||||
[Alice]="$((2 ^ 10))"
|
||||
[Bob]=2048
|
||||
)
|
||||
echo "${array[$1]}"
|
||||
}
|
||||
|
||||
person "Alice"
|
||||
|
|
Loading…
Reference in a new issue