aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-14 17:00:39 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-14 17:00:39 +0000
commit3e8f01e053e208d35d1b48fb164b76a39b3ff0f2 (patch)
tree2a2321b677e91155ba862c7d99a40049a874fe28
parent4956491321c550c805a910a434bcd929dc410795 (diff)
fix completion for "module reload mod_1 mod_2 ... "
(should do the same for the other similar commands, "reload", "module unload" and so on. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47620 f38db490-d61c-443f-a65b-d21fe96a405b
-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)