zsh-workers
 help / color / mirror / code / Atom feed
From: Marko Myllynen <myllynen@redhat.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Update _virsh completion
Date: Mon, 5 Sep 2016 09:29:46 +0300	[thread overview]
Message-ID: <05a277b7-655b-705d-968b-e33ee67d7bab@redhat.com> (raw)
In-Reply-To: <20160902182024.GA26517@fujitsu.shahaf.local2>

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 <TAB>
>> $ LIBVIRT_DEFAULT_URI=qemu:///system virsh start --domain <TAB>
>>
>> So there the former works, the latter doesn't.
> 
> How would you handle
> 
>     % LIBVIRT_DEFAULT_URI=foo://bar
>     % unset LIBVIRT_DEFAULT_URI; virsh start <TAB>
> 
> or
> 
>     % unset LIBVIRT_DEFAULT_URI
>     % LIBVIRT_DEFAULT_URI=$(/this/command/is/not/idempotent/or/not/deterministic) virsh start <TAB>
> 
> ?  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 <TAB>.
> 
> (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


      parent reply	other threads:[~2016-09-05  8:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29  8:03 Marko Myllynen
2016-08-31 17:49 ` Daniel Shahaf
2016-08-31 21:44   ` Oliver Kiddle
2016-09-01 16:01     ` Daniel Shahaf
2016-09-02  9:36   ` Marko Myllynen
2016-09-02 18:20     ` Daniel Shahaf
2016-09-04 18:26       ` Daniel Shahaf
2016-09-05  6:29       ` Marko Myllynen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05a277b7-655b-705d-968b-e33ee67d7bab@redhat.com \
    --to=myllynen@redhat.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).