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

Re: xargs with zsh function



On 2021-01-19 1:39 p.m., Bart Schaefer wrote:
On Tue, Jan 19, 2021 at 12:27 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
My strong preference would be that zargs be agnostic as to one's
environment and functions called by it would behave exactly as
otherwise.
That's what the zargs_patch.txt in my other message is supposed to do.

I'd like to be able to link my functions together
via piping+zargs.
Pipelines are for linking together things that expect to read standard
input and write standard output.

foo | bar

is the same as

foo > file
bar < file

except that the file is being simultaneously written and read
The above is much easier to understand and of course obviously simpler.  As I said, the whole thing is a bit of a mystery.  A lot of stuff attaches to ' | ' obviously.

If you rejigger them into a pipeline, you
force some of them into background subshells, and those are no longer
able to affect the current shell.  That may or may not be OK, but you
should think about it.
Well again I have no idea what the intimacies of it are but at least the notion of being able to link functions analogously to what xargs does is desirable.  If you have a patch that does that for
zargs I'd sure like to have it.






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