On 05/04/2010 03:11 AM, Marc Herbert wrote:
> I'd like to know why you absolutely want the callee to perform a
> side-effect on the caller. This is your original sin
> IMHO. Side-effects are evil, use as little of them as you can.

Except that in computing tab completion, side effects are _all_ that you
want - basically, Freddie's problem is how to populate the global
completion variables from within helper functions.

> Of course whenever "blackbox" returns only one value the whole thing
> can be much simpler, just: b=$(blackbox)

Except that it forks a subshell and consumes trailing newlines, and the
whole point of this exercise is to avoid forks and spurious corruption
of trailing newlines.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to