]> xenbits.xensource.com Git - libvirt.git/commitdiff
vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options to list
authorLin Ma <lma@suse.com>
Tue, 8 May 2018 14:20:37 +0000 (22:20 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 10 May 2018 08:01:15 +0000 (10:01 +0200)
It's helpful for users while they type certain kind of VSH_OT_ARGV options.
e.g.

$ virsh domstats --domain sles12sp3 --d<TAB>

Signed-off-by: Lin Ma <lma@suse.com>
tools/vsh.c

index 68f3cd99f9b4ef173fcd69972c3289c530b543db..148c920a50df29c68b3df5442a92c322b96869b8 100644 (file)
@@ -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;
             }