3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

client: disable cmd completion for the agent prompt

This commit is contained in:
Tim Kourt 2018-05-03 13:57:53 -07:00 committed by Denis Kenzior
parent af14445509
commit 2817aeb35d
2 changed files with 13 additions and 8 deletions

View File

@ -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);

View File

@ -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");