]> xenbits.xensource.com Git - libvirt.git/commit
vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_ARGV options
authorLin Ma <lma@suse.com>
Tue, 8 May 2018 14:20:34 +0000 (22:20 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 10 May 2018 08:01:15 +0000 (10:01 +0200)
commit0d1c1a74b7bfcbf855537ee3245524891e52409a
treef948079e3ea6d1c318f882d6790f8146eeb15c4e
parentee6113aaea5cd5b7dba4c5f66d62d0cf7b9627fc
vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_ARGV options

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 <TAB><TAB>
    --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 <TAB><TAB>
    leap42.3    sles12sp3    sles15    win10

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