aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-06 11:37:33 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-06 11:37:33 -0400
commit4b352f89a309dd2405f782062476202829beee37 (patch)
tree113295ef0d7d875c4bab07c4386b633939789868 /parse.c
parent5221584d2836769cb6bd714a601351117eb35a70 (diff)
Add Shell dsl type
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 2f3a8c3d..1e421085 100644
--- a/parse.c
+++ b/parse.c
@@ -1185,6 +1185,8 @@ PARSER(parse_text) {
} else if (strchr(interp_chars, *pos)) {
open_interp = *pos;
++pos;
+ } else if (*pos == '(') {
+ open_interp = '@'; // For shell commands
}
static const char *quote_chars = "\"'`|/;([{<";
if (!strchr(quote_chars, *pos))
@@ -1195,6 +1197,8 @@ PARSER(parse_text) {
if (!lang && open_quote == '/')
lang = "Pattern";
+ else if (!lang && open_quote == '(')
+ lang = "Shell";
} else {
return NULL;
}