aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2002-01-10 08:15:58 +0000
committerEli Zaretskii <eliz@gnu.org>2002-01-10 08:15:58 +0000
commitdb60ec6263a44dae741e54521ccd154ff8b76469 (patch)
tree481bf1ae55ca721d52cafb68f749967c35fb11e6 /gdb/completer.c
parent39c22d1ade25baa5c9afaac499038ddc76a3dd60 (diff)
downloadgdb-db60ec6263a44dae741e54521ccd154ff8b76469.zip
gdb-db60ec6263a44dae741e54521ccd154ff8b76469.tar.gz
gdb-db60ec6263a44dae741e54521ccd154ff8b76469.tar.bz2
* completer.c (command_completer): New function.
* completer.h <command_completer>: Add prototype. * cli/cli-cmds.c (init_cli_cmds): Make command_completer be the completer for the "help" command.
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index f63fe02..a06eb65 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -339,6 +339,14 @@ location_completer (char *text, char *word)
return list;
}
+/* Complete on command names. Used by "help". */
+char **
+command_completer (char *text, char *word)
+{
+ return complete_on_cmdlist (cmdlist, text, word);
+}
+
+
/* Here are some useful test cases for completion. FIXME: These should
be put in the test suite. They should be tested with both M-? and TAB.