From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8477 invoked from network); 11 Jun 2003 17:45:14 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Jun 2003 17:45:14 -0000 Received: (qmail 16520 invoked by alias); 11 Jun 2003 17:45:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6162 Received: (qmail 16502 invoked from network); 11 Jun 2003 17:45:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 11 Jun 2003 17:45:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [158.130.12.194] by sunsite.dk (MessageWall 1.0.8) with SMTP; 11 Jun 2003 17:45:0 -0000 Received: from blue.seas.upenn.edu (BLUE.SEAS.UPENN.EDU [158.130.64.177]) by lion.seas.upenn.edu (8.12.9/8.12.8) with ESMTP id h5BHixM1018063 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 11 Jun 2003 13:44:59 -0400 Received: from blue.seas.upenn.edu (localhost [127.0.0.1]) by blue.seas.upenn.edu (8.12.9/8.12.9) with ESMTP id h5BHiwOM029722 for ; Wed, 11 Jun 2003 13:44:58 -0400 (EDT) Received: (from juhas@localhost) by blue.seas.upenn.edu (8.12.9/8.12.9/Submit) id h5BHiwdF029721 for zsh-users@sunsite.dk; Wed, 11 Jun 2003 13:44:58 -0400 (EDT) Date: Wed, 11 Jun 2003 13:44:58 -0400 From: Pavol Juhas To: ZShell Users Subject: Re: global alias as function - "--attach" Message-ID: <20030611174458.GA28953@seas.upenn.edu> Mail-Followup-To: ZShell Users References: <20030611131317.GA13170@math.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030611131317.GA13170@math.fu-berlin.de> User-Agent: Mutt/1.4i On Wed, Jun 11, 2003 at 03:13:17PM +0200, Sven Guckes wrote: > can i use a global alias as a function within a command? > > the real problem: > someone asked (yet again) whether mutt (the mailer) > can attach a list of files or a directory of files. > this is not possible yet - mutt can only attach files given > on the command line when *every* file is preceded by "-a". > > suggestion: > a patch might get this to work (as usual). > however, i can imagine something like this: > > mutt --attach file dir/ -xyz > > here, the "--attach" would be a global alias > which test the following parameters for > files and files within directories. Instead of using alias, you could write a wrapper script (or shell function) for mutt, which would handle the --attach option and call the normal /usr/bin/mutt. Pavol