summaryrefslogtreecommitdiff
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
commitd8141e42e6d2c4b105aa8a78adf8dae815da9cc7 (patch)
treea9765ce7d888f1439c1eee0ca535b76ec81caec3 /gdb/completer.c
parentab46302f2ae52fd4cfdfb8bd8a1629d8b09b25f4 (diff)
downloadgdb-d8141e42e6d2c4b105aa8a78adf8dae815da9cc7.tar.gz
* 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 f63fe02f993..a06eb65ac08 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.