diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lush.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -934,8 +934,6 @@ char **lush_split_commands(char *line) { while (isspace((unsigned char)*start)) start++; - // Check if entering or leaving a quoted string - // Check for operators int op_len = operator_length(start); if (op_len > 0) { @@ -1111,6 +1109,15 @@ int lush_execute_chain(lua_State *L, char ***commands, int num_commands) { commands++; } + if (last_result == 0 && i > 0) { + commands--; + if (is_operator(commands[0][0]) == OP_OR) { + commands += 3; + continue; + } + commands++; + } + // Handle other operations if (commands[1] != NULL) { int op_type = is_operator(commands[1][0]); |
