From: Lin Ma Date: Fri, 11 Sep 2020 07:13:07 +0000 (+0800) Subject: vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_INT options X-Git-Tag: v6.8.0-rc1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9a320bf97be9ba1d9692d5490554a2a8d8495f0;p=thirdparty%2Flibvirt.git vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_INT options Commit c7151b0 added the completion for VSH_OT_INT options, say '--cellno' and '--pagesize', So we need to ignore VSH_OT_INT otherwise we get the incorrect completion. before: # virsh freepages --pagesize --all --cellno 1GiB 2MiB 4KiB after: # virsh freepages --pagesize 1GiB 2MiB 4KiB Signed-off-by: Lin Ma Reviewed-by: Michal Privoznik --- diff --git a/tools/vsh.c b/tools/vsh.c index e3c2404a74..87c409e4aa 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2778,6 +2778,7 @@ vshReadlineParse(const char *text, int state) } else { if (!opt || (opt->type != VSH_OT_DATA && opt->type != VSH_OT_STRING && + opt->type != VSH_OT_INT && opt->type != VSH_OT_ARGV)) list = vshReadlineOptionsGenerator(text, cmd, partial);