zsh-users
 help / color / mirror / code / Atom feed
* xargs with functions
@ 2014-11-17 18:24 Ray Andrews
  2014-11-17 18:40 ` Axel Beckert
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Andrews @ 2014-11-17 18:24 UTC (permalink / raw)
  To: zsh-users

Is there some way to throw one's entire setup to xargs?
If I want to use a shell function with xargs I hafta do this:

    $ls * | xargs ./test

Where 'test' contains:

     # re-source my functions
     for aa in /aWorking/Zsh/Source/*;  do source $aa; done

        #call my 'l' function.
     l ,s "$@"

Is there a way to pass the functions forward every time automatically,
so that I can:

     ls * | xargs l ,s

Or maybe some other solution? It seems clumsy. I understand that subshells
receive the environment, but not functions, why is that? Perhaps what's
needed is some way to make the subshell run .zshrc automatically? Or am
I barking up the wrong tree as usual?


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

end of thread, other threads:[~2014-11-17 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 18:24 xargs with functions Ray Andrews
2014-11-17 18:40 ` Axel Beckert
2014-11-17 20:31   ` Ray Andrews

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).