From nobody Wed May 14 09:50:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525789428205763.3390437781014; Tue, 8 May 2018 07:23:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D597830B96E8; Tue, 8 May 2018 14:23:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A53592015884; Tue, 8 May 2018 14:23:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5119A5BBE5; Tue, 8 May 2018 14:23:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w48ENS7l003881 for ; Tue, 8 May 2018 10:23:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5C594100195F; Tue, 8 May 2018 14:23:28 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5460C100195A; Tue, 8 May 2018 14:23:25 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F907883A5; Tue, 8 May 2018 14:23:08 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Tue, 08 May 2018 08:23:04 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Tue, 8 May 2018 22:20:34 +0800 Message-Id: <20180508142040.18593-7-lma@suse.com> In-Reply-To: <20180508142040.18593-1-lma@suse.com> References: <20180508142040.18593-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 08 May 2018 14:23:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 08 May 2018 14:23:23 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, pkrempa@redhat.com Subject: [libvirt] [PATCH v2 06/12] vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_ARGV options X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 08 May 2018 14:23:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Currently the VSH_OT_ARGV options don't support complete, But some of VSH_OT_ARGV options are gonna support complete in upcoming patches. Once applied the upcoming completion patches for VSH_OT_ARGV options, If we don't ignore VSH_OT_ARGV here, The vshReadlineOptionsGenerator will be called, Hence complete output will consist of the result by command completer + the result by option completer, It's confusing. e.g. $ virsh domstats --domain --backing --interface --list-paused --perf --vcpu --balloon leap42.3 --list-persistent --raw win10 --block --list-active --list-running sles12sp3 --cpu-total --list-inactive --list-shutoff sles15 --enforce --list-other --list-transient --state After this patch and the upcoming completion patches: $ virsh domstats --domain leap42.3 sles12sp3 sles15 win10 Signed-off-by: Lin Ma --- tools/vsh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index 57f7589b53..e45bb0d825 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2824,7 +2824,9 @@ vshReadlineParse(const char *text, int state) if (!cmd) { list =3D vshReadlineCommandGenerator(text); } else { - if (!opt || (opt->type !=3D VSH_OT_DATA && opt->type !=3D VSH_= OT_STRING)) + if (!opt || (opt->type !=3D VSH_OT_DATA && + opt->type !=3D VSH_OT_STRING && + opt->type !=3D VSH_OT_ARGV)) list =3D vshReadlineOptionsGenerator(text, cmd, partial); =20 if (opt && opt->completer) { --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list