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

xargs with functions



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?



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