* command substitution word joining
@ 2018-03-02 23:45 Daniel Shahaf
2018-03-03 5:33 ` Mikael Magnusson
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2018-03-02 23:45 UTC (permalink / raw)
To: zsh-users
Consider:
% () { print -r - ${(q)@} } <(:)x
/proc/self/fd/11x
I can't see any use-case for appending the 'x' as part of the same word.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: command substitution word joining
2018-03-02 23:45 command substitution word joining Daniel Shahaf
@ 2018-03-03 5:33 ` Mikael Magnusson
2018-03-03 5:50 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2018-03-03 5:33 UTC (permalink / raw)
To: Daniel Shahaf; +Cc: Zsh Users
echo --input-file=<(:)
--input-file=/proc/self/fd/13
I could imagine some command taking multiple filenames with ,
separation perhaps? But you can't prepend anything with =(:).
On Sat, Mar 3, 2018 at 12:45 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Consider:
>
> % () { print -r - ${(q)@} } <(:)x
> /proc/self/fd/11x
>
> I can't see any use-case for appending the 'x' as part of the same word.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: command substitution word joining
2018-03-03 5:33 ` Mikael Magnusson
@ 2018-03-03 5:50 ` Bart Schaefer
2018-03-05 4:00 ` Daniel Shahaf
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2018-03-03 5:50 UTC (permalink / raw)
To: Zsh Users
On Fri, Mar 2, 2018 at 9:33 PM, Mikael Magnusson <mikachu@gmail.com> wrote:
> echo --input-file=<(:)
> --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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: command substitution word joining
2018-03-03 5:50 ` Bart Schaefer
@ 2018-03-05 4:00 ` Daniel Shahaf
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Shahaf @ 2018-03-05 4:00 UTC (permalink / raw)
To: Zsh Users
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@gmail.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-05 4:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 23:45 command substitution word joining Daniel Shahaf
2018-03-03 5:33 ` Mikael Magnusson
2018-03-03 5:50 ` Bart Schaefer
2018-03-05 4:00 ` Daniel Shahaf
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).