summaryrefslogtreecommitdiff
path: root/queries/bash
diff options
context:
space:
mode:
authorDavid Hotham <david.hotham@metaswitch.com>2020-12-19 20:31:55 +0000
committerThomas Vigouroux <tomvig38@gmail.com>2020-12-25 15:56:06 +0100
commit026314f2a9e6ed09b570f22c8abab883975228a5 (patch)
treebe4cda42063a8ed5b92024eca1be7e23f431f87a /queries/bash
parentac42192e1995cdf51d5481e78c69ae0f34edb672 (diff)
fixes to bash highlighting
Diffstat (limited to 'queries/bash')
-rw-r--r--queries/bash/highlights.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index c49aed84..943c23df 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -70,13 +70,13 @@
(special_variable_name) @constant
((word) @constant.builtin
- (#vim-match? @constant.builtin "SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)"))
+ (#match? @constant.builtin "^SIG(INT|TERM|QUIT|TIN|TOU|STP|HUP)$"))
((word) @boolean
- (#vim-match? @boolean "true|false"))
+ (#match? @boolean "^(true|false)$"))
((word) @number
- (#vim-match? @number "^\d*$"))
+ (#match? @number "^[0-9]+$"))
(comment) @comment
(test_operator) @string
@@ -96,11 +96,13 @@
(command
argument: [
(word) @parameter
- ((word) @number
- (#vim-match? @number "^\d*$"))
(concatenation (word) @parameter)
])
+(command
+ argument: ((word) @number
+ (#match? @number "^[0-9]+$")))
+
(file_redirect
descriptor: (file_descriptor) @operator
destination: (word) @parameter)
@@ -115,5 +117,3 @@
(case_item
value: (word) @parameter)
-
-(concatenation (word) @parameter)