From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5484 invoked by alias); 6 Sep 2016 00:17:35 -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: 39187 Received: (qmail 23075 invoked from network); 6 Sep 2016 00:17:35 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.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(66.111.4.28):SA:0(0.0/5.0):. Processed in 0.661366 secs); 06 Sep 2016 00:17:35 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=mkvI2qvgWj4yrTmT3d8g1Og2kXE=; b=lGpV9K /XAkjgAu3Al/aekJWtt4+gspUpz0Wiv7UPitmqDoimB8Pv7W5r+YzJV8Lk1YNOpy 721D85URaxczgI0Hy3R63uO42XxU+NG7nnVx0F8XeDncc2yp7pLUVi3u0aMAVzDf 1rJEFYuMmVKAi6x/EGhq16QXcE8zhxWTmuu0w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=mkvI2qvgWj4yrTmT3d8g1Og2kXE=; b=FJT3m a+vf+1IKCzh4hze68mX/+rH74YuUyYdORF5hhQ+MmWDyEQPc3IRPUTrp5vE3cfTS 4WaiBLUTbE+eoGaGpCByz6zeuXr0ktu2MmxEW87ulrwhR26InhUw1STpVVnQeY+i oH4Vu7MXHcoAeHInKOuPj2kM9fhxYHMtBLHtyo= X-Sasl-enc: N6YrjLwAPfSSD89PYkLRx2z/TF0LDI7GKfbHHonNnlXn 1473121046 Date: Tue, 6 Sep 2016 00:16:52 +0000 From: Daniel Shahaf To: Marko Myllynen Cc: zsh workers Subject: Re: More _libvirt (virsh) completion tweaks Message-ID: <20160906001652.GA30336@fujitsu.shahaf.local2> References: <2a9d0f77-a2af-a6aa-93b6-962204258164@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2a9d0f77-a2af-a6aa-93b6-962204258164@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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. Thanks for all the patches1 Daniel