Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _libvirt, $opt_args, and noglob
- X-seq: zsh-workers 39215
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: _libvirt, $opt_args, and noglob
- Date: Wed, 7 Sep 2016 12:53:13 +0300
- In-reply-to: <20160906234646.GB17896@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: <20160904182622.GA32454@fujitsu.shahaf.local2> <20160906234646.GB17896@fujitsu.shahaf.local2>
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
Hi,
On 2016-09-07 02:46, Daniel Shahaf wrote:
> Daniel Shahaf wrote on Sun, Sep 04, 2016 at 18:26:22 +0000:
>> In the special case of _libvirt, simply adding noglob to the
>> _call_program arguments would probably fix this.
>
> Done, but the last line touches the sudo invocation from Oliver's
> gain-privileges patch. Oliver: shall I wait with committing this until
> you've committed gain-privileges?
>
> @@ -224,7 +224,7 @@ case $state in
> local srv ; (( ${(k)words[(I)--server]} > 0 )) && srv=${words[1+${(k)words[(I)--server]}]}
> [[ -z $srv ]] && return 1
> [[ -n ${srv//[[:alnum:]]} ]] && return 1
> - _wanted clients expl client compadd ${=${${(f):-"$(sudo virt-admin ${(Q)conn_opt} srv-clients-list --server $srv 2>/dev/null)"}/ [a-z]*}//[^0-9]} && return 0
> + _wanted clients expl client compadd ${=${${(f):-"$(noglob sudo virt-admin ${(Q)conn_opt} srv-clients-list --server $srv 2>/dev/null)"}/ [a-z]*}//[^0-9]} && return 0
> fi
> [[ -z $_cache_virt_admin_cmd_opts[$cmd] ]] && \
> _cache_virt_admin_cmd_opts[$cmd]=${(M)${${${${=${(f)"$(_call_program virt-admin virt-admin help $cmd 2>&1)"}}/\[}/\]}/\;}:#-[-0-9A-Za-z]*}
> ]]]
Do we need any of (Q)'s there any more after your addition of:
uri=${uri//(#m)\\([\\:])/${MATCH[2]}} # opt_args elements are colon-escaped
Based on a quick test looks like they could be dropped (or
perhaps even changed to (q))?
Thanks,
--
Marko Myllynen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author