diff options
author | Wenchao Xia <xiawenc@linux.vnet.ibm.com> | 2013-08-27 20:38:27 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-08-30 07:41:15 -0400 |
commit | 7ca0e061044615e39eab2b22b8fc2791a4d77c34 (patch) | |
tree | feb0c82cfd976efe4c5e4b4c1508673a3bfec890 | |
parent | 129be006d63ba90b788de6b1610892e02ef5eaba (diff) | |
download | qemu-7ca0e061044615e39eab2b22b8fc2791a4d77c34.zip qemu-7ca0e061044615e39eab2b22b8fc2791a4d77c34.tar.gz qemu-7ca0e061044615e39eab2b22b8fc2791a4d77c34.tar.bz2 |
monitor: improve auto complete of "help" for single command in sub group
Now special case "help *" in auto completion can work with sub commands,
such as "help info u*".
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r-- | monitor.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -4330,10 +4330,8 @@ static void monitor_find_completion_by_table(Monitor *mon, cmd_completion(mon, str, QKeyCode_lookup[i]); } } else if (!strcmp(cmd->name, "help|?")) { - readline_set_completion_index(mon->rs, strlen(str)); - for (cmd = cmd_table; cmd->name != NULL; cmd++) { - cmd_completion(mon, str, cmd->name); - } + monitor_find_completion_by_table(mon, cmd_table, + &args[1], nb_args - 1); } break; default: |