aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lush.c b/src/lush.c
index 68447b0..ed6450b 100644
--- a/src/lush.c
+++ b/src/lush.c
@@ -1186,9 +1186,12 @@ int lush_execute_chain(lua_State *L, char ***commands, int num_commands) {
continue;
}
}
- if (commands[0] != NULL) {
+ // Run the command or move past the operator
+ if (commands[0] != NULL && !is_operator(commands[0][0])) {
last_result = run_command(L, commands);
commands += 2;
+ } else {
+ commands++;
}
}