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

Re: xargs with functions



Hi Ray,

On Mon, Nov 17, 2014 at 10:24:42AM -0800, Ray Andrews wrote:
> Is there a way to pass the functions forward every time automatically,
> so that I can:
> 
>     ls * | xargs l ,s

xargs is not from zsh but a binary (/usr/bin/xargs in my case) which
is called. And that binary likely calls 'exec "$@"' and not 'exec
$SHELL -c "$@"'

But zsh's zargs seems to support functions (but not aliases). Try this:

% autoload -U zargs
% zargs -- * -- l ,s

HTH

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@xxxxxxxxxxxxxxx  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@xxxxxxxxx (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



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