From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23006 invoked by alias); 5 Sep 2016 08:16:22 -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: 39178 Received: (qmail 24273 invoked from network); 5 Sep 2016 08:16:22 -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.28691 secs); 05 Sep 2016 08:16:22 -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:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=ttAdM2g/EQ5lOUvFUe3rtVSTjkyPJfy8TwxK9ojeKfE=; b=PV61B+lFZO+5sM5HTtZl0YzRVUUPTO+Ov0Q/A0UoPXK7ExzAiEE78Yj6yLfCMrXOSB FlA8TmdsNQgZ4RMNtDWF651QF+13o7XclXMjunCdmCMAJpW83cnaU9g+KSwn397mggY8 dgFceE2MRdhaba9ooVT4hyj6/UTRe5X+vv+Mo0lq23braQc1XBQ4XuZjxRDQYauvbhFU mWwyo341rpyZtf8236RDaW7nOis7hwejVrt1akRyXdIEAJSeBugQzrLMbsxTWGgJjKPh xS8bY2G9FiJbJPWbGK9NKe7YpkfpNavd/zbndRzBvv9L+Rprur7Vzlzd1+Z14JQAddoV UPow== X-Gm-Message-State: AE9vXwPtrQgwnd9M9hATb5pAsEugmeSBx1j+WHBdUKlwRYWKJLxJVfGPKtjgdTQX4dYew6Of X-Received: by 10.194.153.195 with SMTP id vi3mr27860196wjb.182.1473056988926; Sun, 04 Sep 2016 23:29:48 -0700 (PDT) Reply-To: Marko Myllynen Subject: Re: Update _virsh completion References: <20160831174915.GA11043@fujitsu.shahaf.local2> <20160902182024.GA26517@fujitsu.shahaf.local2> To: zsh workers From: Marko Myllynen Organization: Red Hat Message-ID: <05a277b7-655b-705d-968b-e33ee67d7bab@redhat.com> Date: Mon, 5 Sep 2016 09:29:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160902182024.GA26517@fujitsu.shahaf.local2> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, On 2016-09-02 21:20, Daniel Shahaf wrote: > Marko Myllynen wrote on Fri, Sep 02, 2016 at 12:36:44 +0300: > >> By the way, I noticed one corner case where the connection URI is not >> passed properly, I think this is pretty uncommon but I wonder should >> this be handled by _libvirt or perhaps in a more generic way? >> >> $ unset LIBVIRT_DEFAULT_URI >> $ virsh -c qemu:///system start --domain >> $ LIBVIRT_DEFAULT_URI=qemu:///system virsh start --domain >> >> So there the former works, the latter doesn't. > > How would you handle > > % LIBVIRT_DEFAULT_URI=foo://bar > % unset LIBVIRT_DEFAULT_URI; virsh start > > or > > % unset LIBVIRT_DEFAULT_URI > % LIBVIRT_DEFAULT_URI=$(/this/command/is/not/idempotent/or/not/deterministic) virsh start > > ? Both in the «_call_program foo ...$words[N]...» case above and in the > two cases here, the question is how much it is okay to eval the argument > at a . > > (By the way, zsh-syntax-highlighting faces a similar issue, for example > when it needs to determine whether a command word, which is a parameter > expansion, refers to an alias or to a function.) Good points, yeah, can't see an easy solution to those but since at least in the case of _libvirt it's likely to be a corner case shouldn't be too much of an issue. Thanks, -- Marko Myllynen