On 3/29/06, Claes Nästén <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I did a quick run through the documentation of fish on the fish site
> and did not find anything corresponding syntax I'm used to from bash:
>
> $ vimdiff <(ls /dir1) <(ls /dir2)
>
> Is there corresponding functionality/syntax in fish available, and if
> not planned?

There is a shellscript function called psub (Short for process
substitution, which is the name of this feature in bash), that writes
the filename of a newly created named pipe to stdout, uses cat to
write stdin into said pipe, and adds an event handler that deletes the
file once the parent process dies. Using psub, the above can be
written as:

vimdiff (ls /dir1|psub) (ls /dir2|psub)

The reason why this uses a different syntax than bash is that this way
it can be implemented in shellscript instead of as a part of the shell
itself.

>
> Thanks,
>
> --
> Claes Nästén, <[EMAIL PROTECTED]>, http://www.pekdon.net/
>

--
Axel


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to