[libvirt] [PATCH v2 09/12] vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options to list

Michal Privoznik mprivozn at redhat.com
Thu May 10 09:17:05 UTC 2018


On 05/08/2018 04:20 PM, Lin Ma wrote:
> 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 at suse.com>
> ---
>  tools/vsh.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/vsh.c b/tools/vsh.c
> index e45bb0d825..279d1b56e6 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;
>              }
> 

Okay, with this change the 06/12 patch makes sense. As pointed out there
small reordering is required.

ACK

Michal




More information about the libvir-list mailing list