summaryrefslogtreecommitdiff
path: root/vtysh/vtysh_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh_main.c')
-rw-r--r--vtysh/vtysh_main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index cd59d8094b..3dd70983bc 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -611,7 +611,16 @@ int main(int argc, char **argv, char **env)
if (logfile)
log_it(cmd->line);
- ret = vtysh_execute_no_pager(cmd->line);
+ /*
+ * Parsing logic for regular commands will be different than
+ * for those commands requiring further processing, such as
+ * cli instructions terminating with question-mark character.
+ */
+ if (!vtysh_execute_command_questionmark(cmd->line))
+ ret = CMD_SUCCESS;
+ else
+ ret = vtysh_execute_no_pager(cmd->line);
+
if (!no_error
&& !(ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON
|| ret == CMD_WARNING))