aboutsummaryrefslogtreecommitdiffhomepage
path: root/highlight.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-13 10:08:04 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-13 10:10:49 -0800
commit1fbf63381782b0badead61d1576ad6a1e29fc3ea (patch)
tree778b1397a565f6cc214ae62ed6c15921d77d63b7 /highlight.cpp
parentf733dc5eae81c092f74522f4e5cc7b3d27f2b943 (diff)
Reimplement exec parsing. Instead of special-casing exec as a command,
promote it to a decoration (like 'command' or 'builtin'). This makes tab completion and syntax highlighting treat exec's first argument as a command and is otherwise a nice simplification. Fixes #1300
Diffstat (limited to 'highlight.cpp')
-rw-r--r--highlight.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/highlight.cpp b/highlight.cpp
index dc9da156..55db8a5a 100644
--- a/highlight.cpp
+++ b/highlight.cpp
@@ -1236,7 +1236,7 @@ static bool command_is_valid(const wcstring &cmd, enum parse_statement_decoratio
{
/* Determine which types we check, based on the decoration */
bool builtin_ok = true, function_ok = true, abbreviation_ok = true, command_ok = true, implicit_cd_ok = true;
- if (decoration == parse_statement_decoration_command)
+ if (decoration == parse_statement_decoration_command || decoration == parse_statement_decoration_exec)
{
builtin_ok = false;
function_ok = false;