zsh-workers
 help / color / mirror / code / Atom feed
From: Doug Kearns <dougkearns@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Re: executing foo.c
Date: Wed, 3 Aug 2005 17:26:24 +1000	[thread overview]
Message-ID: <20050803072624.GE28161@localhost.localdomain> (raw)
In-Reply-To: <pdy9883062309a0bf161632e103@[192.168.1.2]>

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


      reply	other threads:[~2005-08-03  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-03  6:38 Dave Yost
2005-08-03  7:26 ` Doug Kearns [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050803072624.GE28161@localhost.localdomain \
    --to=dougkearns@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).