From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14762 invoked by alias); 6 Sep 2016 08:54:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39190 Received: (qmail 8949 invoked from network); 6 Sep 2016 08:54:28 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f51.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.51):SA:0(-0.0/5.0):. Processed in 0.356877 secs); 06 Sep 2016 08:54:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: myllynen@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.51 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:cc:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=lljd02VN1HmQkGKnfQpnGzSR6GzW6VLGDEA84Tnf6zw=; b=NOm1aDYHKbjKuph7+prlZRJFTYzKPBFodhTsFPOJuDG+rQ8QEPhEe6FmObiQxODbBN WCg2as+j+w7qLtmWfeUJAlxdjyOYHWoOv+O6SRJ16uTfAN3qzuIzaygfE2Gf6Pl/yS5e aXXwibhlYIUXu9i5X+xjUpRg0wb9IJ2ZLp9LZcUBucW3VPU4BagrfFKxlTNLyC1QU16U b5oOUmMgAsCdxhjQpqcVrRtnWkIM8w49hvj8kKMU6unn6Edstc3Jt8ol4LI/Ww1jxRRK TvrFXhDRjwXDsaWaLQja8De3qMovlJLEzohrkNN0T3VfGHf94Ix3/oOEpnaRPB7nFtsE mcXw== X-Gm-Message-State: AE9vXwNILp+6ZpWXLkJKW20buzuCXCA2w0fSywyw6ZVe6SQKanP4l4YlAcGwkihNgmBoX3Ob X-Received: by 10.28.48.19 with SMTP id w19mr1265321wmw.54.1473151620312; Tue, 06 Sep 2016 01:47:00 -0700 (PDT) Reply-To: Marko Myllynen Subject: Re: More _libvirt (virsh) completion tweaks References: <2a9d0f77-a2af-a6aa-93b6-962204258164@redhat.com> <20160906001652.GA30336@fujitsu.shahaf.local2> To: Daniel Shahaf Cc: zsh workers From: Marko Myllynen Organization: Red Hat Message-ID: <34ca6906-2864-420e-db42-7de45d5e1cea@redhat.com> Date: Tue, 6 Sep 2016 11:46:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160906001652.GA30336@fujitsu.shahaf.local2> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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