From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upv0A-00029P-IX for qemu-devel@nongnu.org; Fri, 21 Jun 2013 02:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upv09-0004de-6q for qemu-devel@nongnu.org; Fri, 21 Jun 2013 02:39:18 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:53033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upv08-0004dK-Hw for qemu-devel@nongnu.org; Fri, 21 Jun 2013 02:39:17 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Jun 2013 12:01:53 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 978EDE0057 for ; Fri, 21 Jun 2013 12:08:37 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5L6d6vt28770316 for ; Fri, 21 Jun 2013 12:09:06 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5L6d7fa031600 for ; Fri, 21 Jun 2013 16:39:09 +1000 From: Wenchao Xia Date: Fri, 21 Jun 2013 14:37:36 +0800 Message-Id: <1371796658-15632-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/2] support sub command group for auto completion in monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Wenchao Xia , armbru@redhat.com, lcapitulino@redhat.com This patch modified auto completion a bit, to make it work when there is a folded sub command group, for example, "info" is a sub command group of root command group. Note that at patch 1, the parameter *mon and *cmd_table is brought until monitor_init() level. If *cmd_table is added also in it, a monitor can be created with different command tables, but that requirement do not exist yet, so not changed it to save trouble. Wenchao Xia (2): 1) monitor: discard global variable in auto completion functions 2) monitor: support sub commands in auto completion include/monitor/readline.h | 8 ++++- monitor.c | 78 ++++++++++++++++++++++++++------------------ readline.c | 4 ++- 3 files changed, 56 insertions(+), 34 deletions(-)