From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19155 invoked from network); 12 Dec 2005 15:40:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Dec 2005 15:40:08 -0000 Received: (qmail 47507 invoked from network); 12 Dec 2005 15:40:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Dec 2005 15:40:00 -0000 Received: (qmail 22503 invoked by alias); 12 Dec 2005 15:39:51 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9783 Received: (qmail 22493 invoked from network); 12 Dec 2005 15:39:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Dec 2005 15:39:50 -0000 Received: (qmail 46404 invoked from network); 12 Dec 2005 15:39:50 -0000 Received: from ka.cs.utk.edu (160.36.56.221) by a.mx.sunsite.dk with SMTP; 12 Dec 2005 15:39:49 -0000 Received: from localhost (ka [127.0.0.1]) by ka.cs.utk.edu (Postfix) with ESMTP id B47A0235F9 for ; Mon, 12 Dec 2005 10:39:47 -0500 (EST) Received: from ka.cs.utk.edu ([127.0.0.1]) by localhost (ka [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17304-10 for ; Mon, 12 Dec 2005 10:39:46 -0500 (EST) Received: from namib.cs.utk.edu (namib.cs.utk.edu [160.36.59.92]) by ka.cs.utk.edu (Postfix) with ESMTP id 6AB1E235B2 for ; Mon, 12 Dec 2005 10:39:46 -0500 (EST) Received: by namib.cs.utk.edu (Postfix, from userid 10605) id 361E836EDD; Mon, 12 Dec 2005 10:39:46 -0500 (EST) Date: Mon, 12 Dec 2005 10:39:46 -0500 From: Chris Johnson To: zsh-users@sunsite.dk Subject: Adding Text to Each Match Message-ID: <20051212153946.GA2836@namib.cs.utk.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new with ClamAV and SpamAssasin at cs.utk.edu Is there a non-loop way to replicate text for each filename matching a pattern? For example, I'm trying to generate e-mail messages with attachments that match a pattern to send with mutt. Each attachment needs to be specified with the -a option. echo body | mutt -a file1_foo -a file2_foo \ -s "Here's your foo" username Is there something in zsh that would let me say echo body | mutt [prefix all matches to *foo with -a] \ -s "Here's your foo" username that would expand to the command listed above? I think there's been some talk of this, but I don't know what to search for in the archives. Thanks for your help! -- Chris Johnson cjohnson@cs.utk.edu http://www.cs.utk.edu/~cjohnson