mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
client: disable cmd completion for the agent prompt
This commit is contained in:
parent
af14445509
commit
2817aeb35d
@ -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);
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user