zsh-users
 help / color / mirror / code / Atom feed
* xargs with zsh function
@ 2021-01-17 23:12 Ray Andrews
  2021-01-18  3:10 ` Bart Schaefer
  0 siblings, 1 reply; 19+ messages in thread
From: Ray Andrews @ 2021-01-17 23:12 UTC (permalink / raw)
  To: Zsh Users

Can it be done?

     $ ... | xargs my_function

it seems that xargs only likes binary commands.  There was some thought 
on the web that something roughly like:

     $ ... | xargs "zsh -c my_function"

might work but 'zsh -c' seems to be a virginal shell that doesn't know 
my_function exists.  How do we pipe into a function?

     $ func_2 "${(f)$(func_1 *)}"

... works but there's the usual travail getting zsh to break on lines.  
Mind that's always the case so perhaps that's as good as it gets.  But I 
figure that piping should be doable.




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-01-21 23:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17 23:12 xargs with zsh function Ray Andrews
2021-01-18  3:10 ` Bart Schaefer
2021-01-18 22:14   ` Ray Andrews
2021-01-18 23:09     ` Bart Schaefer
2021-01-19  5:18       ` Ray Andrews
2021-01-19 14:30         ` Ray Andrews
2021-01-19 17:52           ` Lawrence Velázquez
2021-01-19 20:27             ` Ray Andrews
2021-01-19 21:39               ` Bart Schaefer
2021-01-19 23:48                 ` Ray Andrews
2021-01-20  1:05                 ` Ray Andrews
2021-01-20 18:25                   ` Ray Andrews
2021-01-21  5:52                     ` Bart Schaefer
2021-01-21 19:55                       ` Ray Andrews
2021-01-21 21:50                         ` Bart Schaefer
2021-01-21 23:20                           ` Ray Andrews
2021-01-19 20:31             ` Bart Schaefer
2021-01-19 20:59               ` Ray Andrews
2021-01-20 16:27   ` 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).