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

Re: command substitution word joining



Bart Schaefer wrote on Fri, Mar 02, 2018 at 21:50:32 -0800:
> On Fri, Mar 2, 2018 at 9:33 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> > echo --input-file=<(:)

Ah, thanks.

> > --input-file=/proc/self/fd/13
> > I could imagine some command taking multiple filenames with ,
> > separation perhaps? But you can't prepend anything with =(:).
> 
> You can prepend an assignment:
> 
> % foo==(:)
> % print $foo
> /tmp/zshdewoIj

This loses the O_EXCL atomicity guarantee:

% x==(:)
% ls $x 
ls: cannot access '/tmp/zshioVJpt': No such file or directory

It does work as a precommand assignment, though:

% x==(:) eval 'ls $x' 
/tmp/zsh37OnHf



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