summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-06-25 08:22:02 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 14:18:08 -0500
commitf3353c6bc3c7ef4ce018aa4faa1b02aa59d9d178 (patch)
tree2a211dc639b538317c1234513bd11c96fe6c7463 /monitor.c
parenta08d43677f87a19daa653774d3c6f71855e23178 (diff)
downloadqemu-f3353c6bc3c7ef4ce018aa4faa1b02aa59d9d178.tar.gz
qemu-f3353c6bc3c7ef4ce018aa4faa1b02aa59d9d178.tar.bz2
qemu-f3353c6bc3c7ef4ce018aa4faa1b02aa59d9d178.zip
monitor: Add completion for help command
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 7fdd3a0e04..0878c36429 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2921,6 +2921,11 @@ static void monitor_find_completion(const char *cmdline)
for(key = key_defs; key->name != NULL; key++) {
cmd_completion(str, key->name);
}
+ } else if (!strcmp(cmd->name, "help|?")) {
+ readline_set_completion_index(cur_mon->rs, strlen(str));
+ for (cmd = mon_cmds; cmd->name != NULL; cmd++) {
+ cmd_completion(str, cmd->name);
+ }
}
break;
default: