From: Lin Ma Date: Tue, 8 May 2018 14:20:37 +0000 (+0800) Subject: vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options to list X-Git-Tag: v4.4.0-rc1~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee6113aaea5cd5b7dba4c5f66d62d0cf7b9627fc;p=thirdparty%2Flibvirt.git vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options to list It's helpful for users while they type certain kind of VSH_OT_ARGV options. e.g. $ virsh domstats --domain sles12sp3 --d Signed-off-by: Lin Ma --- diff --git a/tools/vsh.c b/tools/vsh.c index 68f3cd99f9..148c920a50 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2685,7 +2685,7 @@ vshReadlineOptionsGenerator(const char *text, } while (opt) { - if (STREQ(opt->def->name, name)) { + if (STREQ(opt->def->name, name) && opt->def->type != VSH_OT_ARGV) { exists = true; break; }