aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@gnu.org>2015-08-15 00:54:25 +0300
committerMarc André Tanner <mat@brain-dump.org>2015-08-15 10:12:46 +0200
commit4b75dfe0c5eb9466ffc7a160fd0fb230c44ce5ff (patch)
tree4f031a16f4a1751bab0c7fae553c900ee4daf8db
parentc034f9ded7a2b827f7f09fed8a0c531fd96a11b0 (diff)
downloadvis-4b75dfe0c5eb9466ffc7a160fd0fb230c44ce5ff.tar.gz
vis-4b75dfe0c5eb9466ffc7a160fd0fb230c44ce5ff.tar.xz
Improve shell highlighting
* lower case variables names are now recognized * special variables ($?, $*, etc) are treated specially * non-sense, like ${foo is not treated as variable reference anymore
-rw-r--r--config.def.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 78b2ccb..fdd20ae 100644
--- a/config.def.h
+++ b/config.def.h
@@ -982,7 +982,13 @@ static Syntax syntaxes[] = {{
"^[0-9A-Z_]+\\(\\)",
&colors[COLOR_CONSTANT],
},{
- "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?",
+ "\\$[?!@#$?*-]",
+ &colors[COLOR_VARIABLE],
+ },{
+ "\\$\\{[A-Za-z_][0-9A-Za-z_]+\\}",
+ &colors[COLOR_VARIABLE],
+ },{
+ "\\$[A-Za-z_][0-9A-Za-z_]+",
&colors[COLOR_VARIABLE],
},{
B"(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)"B,