Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
xargs with functions
- X-seq: zsh-users 19397
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: xargs with functions
- Date: Mon, 17 Nov 2014 10:24:42 -0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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