From 4abd966a9912441c78bc9fc0d9b803b2c0e76c40 Mon Sep 17 00:00:00 2001 From: niten94 <127052329+niten94@users.noreply.github.com> Date: Sat, 15 Feb 2025 07:54:22 +0800 Subject: [PATCH] sh.yaml: Match valid parameter expansions without braces Match parameter expansions with valid name only in shell syntax file when there are no braces. --- runtime/syntax/sh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/syntax/sh.yaml b/runtime/syntax/sh.yaml index 6aefa0e7..3d06317e 100644 --- a/runtime/syntax/sh.yaml +++ b/runtime/syntax/sh.yaml @@ -42,7 +42,7 @@ rules: - statement: "\\s+(-[A-Za-z]+|--[a-z]+)" - identifier: "\\$\\{[0-9A-Za-z_:!%&=+#~@*^$?, .\\-\\/\\[\\]]+\\}" - - identifier: "\\$[0-9A-Za-z_:!%&=+#~@*^$?,\\-\\[\\]]+" + - identifier: "\\$([0-9_!#@*$?-]|[A-Za-z_]\\w*)" - constant.string: start: "\""