Closed aecepoglu closed 3 years ago
I definitely want to support this case.
It looks like we support lisp block comments starting with #|
but not #!
, and we don't have any special handling of the first two characters of the file.
In addition, Guile appears to be unique in ignoring up until a closing !#
:
#!
if at the beginning of a file, except to look for a token indicating the file's sublanguage.#!
that is not one of #!optional
, #!key
, #!rest
, and #!eof
.#!
.So, I propose:
#!
.--guile-shebang
option that ignores until !#
(instead of newline) after the shebang.And maybe:
--language guile
option that selects scheme defaults but also enables --guile-shebang
option.Another example of multiline shebang in a Scheme implementation:
#!/bin/sh
:; exec gosh -- $0 "$@"
EDIT: This shebang is single line! I could not be aware of the slick technique. Sorry to bother you.
Thanks :)
I have guile scripts I use as CLI programs which have shebangs like so:
https://www.gnu.org/software/guile/manual/html_node/Command-Line-Handling.html
This syntax isn't supported by parinfer-rust because it doesn't like
\
in line ends.Is this intended?