Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 904a01c

Browse files
committed
⬆️ tree-sitter-bash, tweak highlighting
1 parent f8a406a commit 904a01c

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

grammars/tree-sitter-bash.cson

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ firstLineRegex: [
2020

2121
folds: [
2222
{
23-
type: 'heredoc'
23+
type: 'heredoc_body'
2424
}
2525
{
2626
type: 'if_statement',
@@ -79,12 +79,30 @@ scopes:
7979

8080
'string': 'string'
8181
'raw_string': 'string'
82-
'heredoc': 'string'
82+
'heredoc_body': 'string'
83+
'heredoc_start': 'string'
8384
'regex': 'string.regexp'
8485

86+
'
87+
"$",
88+
expansion > "${",
89+
expansion > "}"
90+
': 'punctuation.section.embedded'
91+
92+
'string > command_substitution': 'embedded.source'
93+
8594
'function_definition > word': 'entity.name.function'
8695
'command_name': 'entity.name.function'
8796

97+
'file_descriptor': 'constant.numeric'
98+
99+
'command_name > word': [
100+
{match: '^(cd|echo|eval|exit|false|getopts|pushd|popd|return|set|shift|true)$', scopes: 'support.function'}
101+
]
102+
103+
'test_operator': 'entity.other.attribute-name'
104+
'word': [{match: '^-', scopes: 'entity.other.attribute-name'}]
105+
88106
'special_variable_name': 'variable.other.member'
89107
'variable_name': 'variable.other.member'
90108

@@ -123,5 +141,3 @@ scopes:
123141
'">&"': 'keyword.operator'
124142
'"<<-"': 'keyword.operator'
125143
'"<<<"': 'keyword.operator'
126-
127-
'"$"': 'punctuation.section.embedded'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com/atom/language-shellscript/issues"
1717
},
1818
"dependencies": {
19-
"tree-sitter-bash": "^0.13.5"
19+
"tree-sitter-bash": "^0.13.6"
2020
},
2121
"devDependencies": {
2222
"coffeelint": "^1.10.1"

0 commit comments

Comments
 (0)