summaryrefslogtreecommitdiff
path: root/main/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index cac7d7c65..1e9a5e803 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -982,7 +982,9 @@ static char *complete_mod_3_nr(const char *line, const char *word, int pos, int
static char *complete_mod_3(const char *line, const char *word, int pos, int state)
{
- return ast_module_helper(line, word, pos, state, 2, 1);
+ if (pos < 2)
+ return NULL;
+ return ast_module_helper(line, word, pos, state, pos, 1);
}
static char *complete_fn(const char *line, const char *word, int pos, int state)