From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19148 invoked by alias); 17 Nov 2014 18:24:58 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19397 Received: (qmail 10366 invoked from network); 17 Nov 2014 18:24:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_MANY_HDRS_LCASE autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=HYUtEE08 c=1 sm=1 tr=0 a=6Eia9ogllWoXNUe/jSXtcw==:117 a=6Eia9ogllWoXNUe/jSXtcw==:17 a=G8GL833Es-AA:10 a=IkcTkHD0fZMA:10 a=gAKacq7TIxJLqx4Gq8IA:9 a=QEXdDO2ut3YA:10 Message-id: <546A3D6A.4090609@eastlink.ca> Date: Mon, 17 Nov 2014 10:24:42 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: xargs with functions Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit 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?