From: Joshua Colp Date: Wed, 28 Nov 2007 15:48:00 +0000 (+0000) Subject: Hide CLI commands starting with _ from tab completion as was done previously. X-Git-Tag: 1.6.0-beta1~3^2~615 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6ddf3c7b06998a30a05b7fbafa5a5dd52730eac;p=thirdparty%2Fasterisk.git Hide CLI commands starting with _ from tab completion as was done previously. (closes issue #11395) Reported by: eliel Patches: cli.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89982 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/cli.c b/main/cli.c index d80aaae207..c71c49e6ea 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1728,6 +1728,9 @@ static char *__ast_cli_generator(const char *text, const char *word, int state, /* XXX repeated code */ int src = 0, dst = 0, n = 0; + if (e->command[0] == '_') + continue; + /* * Try to match words, up to and excluding the last word, which * is either a blank or something that we want to extend.