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

Re: xargs with zsh function



On 2021-01-20 9:52 p.m., Bart Schaefer wrote:

Since Ray asked:  Apply this with
  patch -p1 Functions/Misc/zargs < zargs_patch2.txt
Seems to pass my posted test with flying colors.  One thing tho, the paths:  My working 'zargs' is:

..../Zsh-5.8/share/zsh/5.8/functions/zargs

I have no directory 'Functions' or 'Misc' anywhere on my system. How is it that my zsh directory tree is different?

BTW, speaking of passing data from one function to another supposing we have a list of filenames in a file:

filename1
filename2
filename with spaces in it
filename with funny characters in it

... you can feed the lines to 'ls' one at a time using zargs as you've shown but 'ls' accepts:

$ ls filename1 filename2 'filename with spaces in it'

... how can the contents of the file be fed to 'ls' as one call, but with the spaces protected?  The individual lines need no quotes to protect them, but once morphed into a single line the quotes must be there.  Can it be done?





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