diff --git a/client/command.c b/client/command.c index f96efa77..24ab7578 100644 --- a/client/command.c +++ b/client/command.c @@ -226,6 +226,11 @@ char **command_completion(const char *text, int start, int end) char *prompt = NULL; bool ends_with_space = false; + if (display_agent_is_active()) { + rl_attempted_completion_over = 1; + return NULL; + } + if (!start) { matches = rl_completion_matches(text, cmd_generator); diff --git a/client/display.c b/client/display.c index c1675b51..2f9a5e85 100644 --- a/client/display.c +++ b/client/display.c @@ -387,6 +387,14 @@ done: l_free(prompt); } +bool display_agent_is_active(void) +{ + if (agent_saved_input) + return true; + + return false; +} + static bool read_handler(struct l_io *io, void *user_data) { rl_callback_read_char(); @@ -477,14 +485,6 @@ void display_agent_prompt_release(void) rl_redisplay(); } -bool display_agent_is_active(void) -{ - if (agent_saved_input) - return true; - - return false; -} - void display_quit(void) { rl_insert_text("quit");