Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: More _libvirt (virsh) completion tweaks



Hi,

On 2016-09-06 03:16, Daniel Shahaf wrote:
> Marko Myllynen wrote on Mon, Sep 05, 2016 at 10:39:16 +0300:
>> Most notably, we now complete domains without the --domain option in
>> case no other options are provided. I picked up few commands which
>> I think are most often used, please feel free to adjust the list of
>> commands if you have other commands in mind.
> 
> Sure, we can add them as we run across them.
> 
>> +++ b/Completion/Unix/Command/_libvirt
>> @@ -127,13 +127,13 @@ case $state in
>> -    if [[ $words[-2] == --(dir|emulatorbin|file|mountpoint|*path|script|source-dev) || $words[-1] == (/*|.*) ]]; then
>> +    if [[ $words[CURRENT-1] == --(dir|emulatorbin|file|mountpoint|*path|script|source-dev) || $words[-1] == (/*|.*) ]]; then
> 
> The second disjunct should use $words[CURRENT] rather than $words[-1].
> I've amended this and pushed.

Yes, correct, thanks for all your help!

Cheers,

-- 
Marko Myllynen



Messages sorted by: Reverse Date, Date, Thread, Author