On 12/4/06, Nicholas Burlett <[EMAIL PROTECTED]> wrote:
> I love using fish, but it seems to be missing a vital feature. It doesn't
> properly handle scripts that start with a colon (:) instead of a shebang
> (#!). I have several scripts in use at my office that are designed to work
> from Win32, Linux, Solaris, and HPUX, and they start with a colon. The bash,
> tcsh, and cmd shells treat this as meaning the script should be interpreted
> as an 'sh' script.

I must confess I've never heard of this feature before. Learn
something every day I guess. Fish uses the execve call from libs to
execute commands, so obviously this is not part of standard
functionality. Could you explain why this is useful?

> Could someone point me to the place in the code I need to modify to make
> this work?

The launch_process function in exec.c is the right place for this. If
the call to execve fails, open the file and check if the first line is
':\n' and if so, do a little magic.

Or perhaps the 'right place' would actually be to submit a patch to
the glibc people?

> Thanks,
> Nick
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users


-- 
Axel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to