Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

executing foo.c



Title: 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


Messages sorted by: Reverse Date, Date, Thread, Author