summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-14 14:24:19 -0400
committerJune McEnroe <june@causal.agency>2020-05-14 14:24:19 -0400
commitf49d2a9ddcfa4402b78f2d6fa121fa97f7e71017 (patch)
tree2be00125090a1b1e4a130b4768c19687816adf74 /bin
parentRemove gpg symlink from NetBSD install (diff)
downloadsrc-f49d2a9ddcfa4402b78f2d6fa121fa97f7e71017.tar.gz
src-f49d2a9ddcfa4402b78f2d6fa121fa97f7e71017.zip
Add hi rule for sh arithmetic expansion
Shell highlighting is hopeless anyway but this makes it slightly less
obviously broken.
Diffstat (limited to 'bin')
-rw-r--r--bin/hi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/hi.c b/bin/hi.c
index b59a88e9..7e19f3fc 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -257,6 +257,8 @@ static const struct Syntax ShSyntax[] = {
 		.pattern = "[\\][\"$\\`]" },
 	{ Interp, .parent = ~SET(Escape),
 		.pattern = "[$][(][^)]*[)]" "|" "`[^`]*`" },
+	{ Interp, .parent = ~SET(Escape),
+		.pattern = "[$][(][(]([^)]|[)][^)])*[)][)]" },
 	{ String, .parent = SET(Interp),
 		.pattern = PATTERN_DQ },
 	{ Interp, .parent = ~SET(Escape),