From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19648 invoked from network); 11 Jun 2003 13:13:40 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Jun 2003 13:13:40 -0000 Received: (qmail 2215 invoked by alias); 11 Jun 2003 13:13:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6159 Received: (qmail 2208 invoked from network); 11 Jun 2003 13:13:23 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 11 Jun 2003 13:13:23 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [160.45.40.10] by sunsite.dk (MessageWall 1.0.8) with SMTP; 11 Jun 2003 13:13:23 -0000 Received: (qmail 13906 invoked by uid 9804); 11 Jun 2003 15:13:22 +0200 Received: from localhost (HELO math.fu-berlin.de) (127.0.0.1) by localhost with SMTP; 11 Jun 2003 15:13:17 +0200 Received: (Qmail 13870 invoked from network); 11 Jun 2003 15:13:17 +0200 Received: From lin207.mi.fu-berlin.de (160.45.45.207) by leibniz.math.fu-berlin.de with SMTP; 11 Jun 2003 15:13:17 +0200 Received: from guckes by lin207.mi.fu-berlin.de with local (Exim 3.35 #1 (Debian)) id 19Q5Ph-000438-00 for ; Wed, 11 Jun 2003 15:13:17 +0200 Date: Wed, 11 Jun 2003 15:13:17 +0200 From: Sven Guckes To: ZShell Users Subject: global alias as function - "--attach" Message-ID: <20030611131317.GA13170@math.fu-berlin.de> Mail-Followup-To: ZShell Users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: Mutt http://www.mutt.org/ X-Accept-Language: de en X-Editor: Vim 6.1 http://www.vim.org/ User-Agent: Mutt/1.5.3i Sender: Sven Guckes X-Envelope-Sender: guckes@inf.fu-berlin.de X-Virus-Scanned: by AMaViS 0.3.12pre7-U23 [13873] (NAI-uvscan@math.fu-berlin.de) X-Remote-IP: 160.45.45.207 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. if these are existing files and directories then they are simply attached each file (or file within a given directory) by expanding it to "-a file": mutt -a file -a dir/file1 -a dir/file2 -xyz however, i am not sure how this can be achieved. the global alias might contain a backtick, of course - but where should the closing backtick come from? hmm.. maybe there is an even simpler way of solving this. i have to admit that i did not do any manual reading or searching the web. if this has been discussed before then i'd appreciate some pointers. key words, URLs etc are fine. thanks! :-) Sven