From d9a320bf97be9ba1d9692d5490554a2a8d8495f0 Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Fri, 11 Sep 2020 15:13:07 +0800 Subject: [PATCH] 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 --- tools/vsh.c | 1 + 1 file changed, 1 insertion(+) 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);