From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6870 invoked from network); 3 Aug 2005 07:33:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Aug 2005 07:33:58 -0000 Received: (qmail 92725 invoked from network); 3 Aug 2005 07:33:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Aug 2005 07:33:52 -0000 Received: (qmail 5052 invoked by alias); 3 Aug 2005 07:33:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21561 Received: (qmail 5040 invoked from network); 3 Aug 2005 07:33:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Aug 2005 07:33:47 -0000 Received: (qmail 92383 invoked from network); 3 Aug 2005 07:33:47 -0000 Received: from mail-ihug.icp-qv1-irony1.iinet.net.au (203.59.1.195) by a.mx.sunsite.dk with SMTP; 3 Aug 2005 07:33:41 -0000 Received: from 203-214-130-184.dyn.iinet.net.au (HELO localhost.localdomain) (203.214.130.184) by mail-ihug.icp-qv1-irony1.iinet.net.au with ESMTP; 03 Aug 2005 15:33:35 +0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="3.95,162,1120406400"; d="scan'208"; a="35957490:sNHT15502156" Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.4/8.12.8) with ESMTP id j737QRt9032109 for ; Wed, 3 Aug 2005 17:26:28 +1000 Received: (from doug@localhost) by localhost.localdomain (8.13.4/8.13.4/Submit) id j737QO32032108 for zsh-workers@sunsite.dk; Wed, 3 Aug 2005 17:26:24 +1000 X-Authentication-Warning: localhost.localdomain: doug set sender to dougkearns@gmail.com using -f Date: Wed, 3 Aug 2005 17:26:24 +1000 From: Doug Kearns To: zsh-workers@sunsite.dk Subject: Re: executing foo.c Message-ID: <20050803072624.GE28161@localhost.localdomain> Mail-Followup-To: zsh-workers@sunsite.dk References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 On Tue, Aug 02, 2005 at 11:38:39PM -0700, Dave Yost wrote: > Hi. > > There should be a way in shells to say what happens if I try to run > an executable file that has a filename extension belonging to some > set. For example, a builtin variable like this: > > EXEC_SPECIAL=(/usr/local/bin/cg .c .java .cp) > > What this would mean is that if foo.c is executable and someone tries > to execute it, do this: > /usr/local/bin/cg foo.c > Similarly for foo.java and foo.cp, or more if there are more > extensions in the array. > > See http://Yost.com/computers/compileAndGo > > The above note about shells is at the end of the page. > > Comments? I haven't had a look at the above page yet but would a suffix alias be sufficient? % alias -s c=/usr/local/bin/cg % hello.c Regards, Doug