Skip to content

Commit 4abd966

Browse files
committed
sh.yaml: Match valid parameter expansions without braces
Match parameter expansions with valid name only in shell syntax file when there are no braces.
1 parent 5a62a8e commit 4abd966

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/syntax/sh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rules:
4242
- statement: "\\s+(-[A-Za-z]+|--[a-z]+)"
4343

4444
- identifier: "\\$\\{[0-9A-Za-z_:!%&=+#~@*^$?, .\\-\\/\\[\\]]+\\}"
45-
- identifier: "\\$[0-9A-Za-z_:!%&=+#~@*^$?,\\-\\[\\]]+"
45+
- identifier: "\\$([0-9_!#@*$?-]|[A-Za-z_]\\w*)"
4646

4747
- constant.string:
4848
start: "\""

0 commit comments

Comments
 (0)