Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: More _libvirt (virsh) completion tweaks
- X-seq: zsh-workers 39190
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: More _libvirt (virsh) completion tweaks
- Date: Tue, 6 Sep 2016 11:46:58 +0300
- Cc: zsh workers <zsh-workers@xxxxxxx>
- In-reply-to: <20160906001652.GA30336@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Red Hat
- References: <2a9d0f77-a2af-a6aa-93b6-962204258164@redhat.com> <20160906001652.GA30336@fujitsu.shahaf.local2>
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
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