[virt-tools-list] [virt-manager] [PATCH v2 00/10] Tab completion in bash shell via the argcomplete

Cole Robinson crobinso at redhat.com
Tue Dec 18 20:53:49 UTC 2018


On 12/07/2018 03:28 AM, Lin Ma wrote:
> v1 -> v2:
> * Wrapper autocomplete function into cli.py to avoid to import argcomplete everywhere
> * Move bash completion template file 'virtmanager' into data/bash-completion/ folder.
> * Modify 'virtmanager', remove the complete lines. instead, The virt-* string will be
>    added into virt-* scripts at build time.
> * copy the 'virtmanager' to virt-* scripts in my_build instead of linking/deleting
>    in my_install_data.
> * Detect bash completion install location by function bash_completion_dir instead of
>    hard code the location.
> * Add a new patch about git ignore.
> 
> 

Thanks! I've pushed these now. I squashed a couple patches together and 
fixed some style issues in your patches. I also added some follow up patches

* rework the setup.py stuff a bit
* add testsuite support
* drop the .completer = _completer stuff and centralize setting it up
* make the argcomplete bits optional by only importing it when 
completion is requested

> 
> * A side effect of patches is:
> Due to the sub options of arguments of virt-* is comma separated, It needs
> to add comma into $COMP_WORDBREAKS to support sub options completion.
> That means, Once we used TAB for option completion, The change impacts the
> current shell.
> 

I couldn't come up with a solution for this either, bash completion is 
complicated! We will wait and see if anyone complains

Thanks,
Cole




More information about the virt-tools-list mailing list