Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: transformations of glob results



On Wed, Sep 23, 2015 at 4:41 PM, Marc Chantreux <khatar@xxxxxxxxx> wrote:
> hello,
>
>> use an anonymous function but all that really does is give you a free
>> local variable, (eg, () { print ${(j:,:):-listmaster@$^@}} }
>
> the thing is: you can't expand a list in an anymous function as it
> communicates with pipes. i'm stuck there but the question was out of
> curiosity.

I'm not sure what you mean by this. There are no pipes in any of the
commands you or I wrote.

% () { print ${(j:,:):-listmaster@$^@} } /etc/*/.keep(:h:t)
listmaster@conf.d,listmaster@env.d,listmaster@modprobe.d,listmaster@opt,listmaster@xml

(as it happens, I did have a } too many before).

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author