aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_sh.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/language_sh.lua')
-rw-r--r--plugins/language_sh.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/language_sh.lua b/plugins/language_sh.lua
index f21557d..9159f3b 100644
--- a/plugins/language_sh.lua
+++ b/plugins/language_sh.lua
@@ -6,6 +6,9 @@ syntax.add {
headers = "^#!.*bin.*sh\n",
comment = "#",
patterns = {
+ -- $# is a bash special variable and the '#' shouldn't be interpreted
+ -- as a comment.
+ { pattern = "$[%a_@*#][%w_]*", type = "keyword2" },
{ pattern = "#.*\n", type = "comment" },
{ pattern = [[\.]], type = "normal" },
{ pattern = { '"', '"', '\\' }, type = "string" },
@@ -15,7 +18,6 @@ syntax.add {
{ pattern = "[!<>|&%[%]=*]", type = "operator" },
{ pattern = "%f[%S]%-[%w%-_]+", type = "function" },
{ pattern = "${.-}", type = "keyword2" },
- { pattern = "$[%a_@*][%w_]*", type = "keyword2" },
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {