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

Re: xargs with zsh function



On 2021-01-21 1:50 p.m., Bart Schaefer wrote:


My instruction was for patching the zsh source tree, not an installed location.
Ah.  Well it worked patched into my copy.  I trust I've not busted something.

That should "just work".  You don't usually even need zargs for that:

% ls -dl -- ${(f)"$(<filenames.txt)"}
... and to the point, I can swap one of my functions for 'ls' and it seems  seamless.

The reason zargs exists is in case the above "ls" complains "argument
list too long".  In that case you can do

% zargs -- ${(f)"$(<filenames.txt)"} -- ls -dl

to break up the argument list into slices that "ls" will accept.
You know, one sentence there and I finally get it.  Why don't they tellya these things?  All good, thanks Bart.







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