summaryrefslogtreecommitdiff
path: root/queries/bash
diff options
context:
space:
mode:
Diffstat (limited to 'queries/bash')
-rw-r--r--queries/bash/highlights.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index 783b149e..187197dc 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -63,13 +63,10 @@
"unset"
] @keyword
-[
- (special_variable_name)
- ("$" (special_variable_name))
- ] @constant
+(special_variable_name) @constant
-((word) @constant
- (#vim-match? @constant "SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)"))
+((word) @constant.builtin
+ (#vim-match? @constant.builtin "SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)"))
((word) @boolean
(#vim-match? @boolean "true|false"))
@@ -87,7 +84,10 @@
(function_definition
name: (word) @function)
-(command_name (word)) @function
+(command_name (word) @function)
+
+((command_name (word) @function.builtin)
+ (#match? @function.builtin "^(cd|echo|eval|exit|getopts|pushd|popd|return|set|shift)$"))
(command
argument: [
@@ -106,6 +106,9 @@
(variable_name) @variable
+((variable_name) @constant
+ (#match? @constant "^[A-Z][A-Z_0-9]*$"))
+
(case_item
value: (word) @parameter)