Shebang support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Shebang support

mcandre
Could gst treat #!... lines as comments? It would reduce much hackery:

http://rosettacode.org/wiki/Multiline_shebang#Smalltalk

This way, Smalltalk code can double as shell script and executable program.

--
Cheers,

Andrew Pennebaker
www.yellosoft.us
_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Shebang support

Paolo Bonzini-2
Il 06/12/2012 17:45, Andrew Pennebaker ha scritto:
> Could gst treat #!... lines as comments?

On the first line, it does.

However, it doesn't work in the case where you cannot use "#!
/usr/bin/env gst".  As the page says, "Occasionally, a more complex
shebang line is needed".

Paolo

> It would reduce much hackery:
>
> http://rosettacode.org/wiki/Multiline_shebang#Smalltalk
>
> This way, Smalltalk code can double as shell script and executable program.


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Shebang support

mcandre
Ah, thank you.

If gst didn't require -f before the file to load, interpreting the first
nonflagged argument as the file to load, then would the more standard
#!/usr/bin/env
gst work?

--
Cheers,

Andrew Pennebaker
www.yellosoft.us
_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Shebang support

Paolo Bonzini-2
Il 07/12/2012 15:22, Andrew Pennebaker ha scritto:
> Ah, thank you.
>
> If gst didn't require -f before the file to load, interpreting the first
> nonflagged argument as the file to load

It does already.  The effect of -f is to pass the remaining arguments to
Smalltalk.  Changing this is not possible for historical reasons and
because it is actually useful to say "gst f.st g.st".

I don't think it is asking too much to write this:

#! /bin/sh
"exec" "gst" "-f" "$0" "$@"

Paolo

> , then would the more standard
> #!/usr/bin/env
> gst work?


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk