From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoaWO-0003sg-92 for qemu-devel@nongnu.org; Wed, 12 Nov 2014 11:12:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoaW6-0000sp-Gu for qemu-devel@nongnu.org; Wed, 12 Nov 2014 11:11:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoaW6-0000sY-87 for qemu-devel@nongnu.org; Wed, 12 Nov 2014 11:11:34 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sACGBWsI021333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 12 Nov 2014 11:11:33 -0500 From: Kevin Wolf Date: Wed, 12 Nov 2014 17:11:18 +0100 Message-Id: <1415808678-30795-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1415808678-30795-1-git-send-email-kwolf@redhat.com> References: <1415808678-30795-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH v2 5/5] monitor: Fix HMP tab completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, armbru@redhat.com, stefanha@redhat.com Commands with multiple boolean flag options (like 'info block') didn't provide correct completion because only the first one was skipped. Signed-off-by: Kevin Wolf --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 3e7c640..e3219e0 100644 --- a/monitor.c +++ b/monitor.c @@ -4698,7 +4698,7 @@ static void monitor_find_completion_by_table(Monitor *mon, } } str = args[nb_args - 1]; - if (*ptype == '-' && ptype[1] != '\0') { + while (*ptype == '-' && ptype[1] != '\0') { ptype = next_arg_type(ptype); } switch(*ptype) { -- 1.8.3.1