From 4b75dfe0c5eb9466ffc7a160fd0fb230c44ce5ff Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 15 Aug 2015 00:54:25 +0300 Subject: 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 --- config.def.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3