diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-11-20 21:02:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-11-20 21:02:36 +0000 |
commit | ace21957447369d273622e8869f1183549cded3d (patch) | |
tree | e1b60584fd3f56030179cad26cfc61c417133efe /gdb/cli | |
parent | ec6632d76b88e151af88bd22fdb310e9dcbb93f5 (diff) | |
download | gdb-ace21957447369d273622e8869f1183549cded3d.zip gdb-ace21957447369d273622e8869f1183549cded3d.tar.gz gdb-ace21957447369d273622e8869f1183549cded3d.tar.bz2 |
gdb: include help aliases in help command completion
There are a bunch of aliases that get used with help, but the current
command completion logic does not include those when doing completions.
Since the framework is already mostly in place, extend complete_on_cmdlist
slightly to pass down the ignore_help_classes flag like is done with the
existing lookup command logic.
Now you can do:
(gdb) help use<tab>
and get back:
(gdb) help user-defined
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-decode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 6e0f0de..3de01d5 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1726,7 +1726,8 @@ lookup_cmd_composition (char *text, "oobar"; if WORD is "baz/foo", return "baz/foobar". */ VEC (char_ptr) * -complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word) +complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word, + int ignore_help_classes) { struct cmd_list_element *ptr; VEC (char_ptr) *matchlist = NULL; @@ -1743,7 +1744,7 @@ complete_on_cmdlist (struct cmd_list_element *list, char *text, char *word) for (ptr = list; ptr; ptr = ptr->next) if (!strncmp (ptr->name, text, textlen) && !ptr->abbrev_flag - && (ptr->func + && (!ignore_help_classes || ptr->func || ptr->prefixlist)) { char *match; |