From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22716 invoked from network); 3 Aug 2005 06:39:02 -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 06:39:02 -0000 Received: (qmail 53467 invoked from network); 3 Aug 2005 06:38:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Aug 2005 06:38:56 -0000 Received: (qmail 25655 invoked by alias); 3 Aug 2005 06:38:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21560 Received: (qmail 25646 invoked from network); 3 Aug 2005 06:38:53 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Aug 2005 06:38:53 -0000 Received: (qmail 53169 invoked from network); 3 Aug 2005 06:38:53 -0000 Received: from 209-128-98-052.bayarea.net (HELO Yost.com) (209.128.98.52) by a.mx.sunsite.dk with SMTP; 3 Aug 2005 06:38:47 -0000 Received: from [192.168.1.2] (209-128-98-052.bayarea.net [209.128.98.52]) by Yost.com (Postfix) with ESMTP id D7642533578 for ; Tue, 2 Aug 2005 23:38:44 -0700 (PDT) Mime-Version: 1.0 Message-Id: Date: Tue, 2 Aug 2005 23:38:39 -0700 To: zsh-workers@sunsite.dk From: Dave Yost Subject: executing foo.c Content-Type: multipart/alternative; boundary="============_-1089071371==_ma============" 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.4 required=5.0 tests=BAYES_00,HTML_40_50, HTML_FONT_BIG,HTML_MESSAGE autolearn=no version=3.0.4 --============_-1089071371==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" 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? Dave --============_-1089071371==_ma============ Content-Type: text/html; charset="us-ascii" executing foo.c
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?

Dave
--============_-1089071371==_ma============--