Email or username:

Password:

Forgot your password?
16 comments
extreme organic gay

@wingo and there's no /bin/env to get it confused with

Andy Wingo

this lets you use guix shell as a shebang line, e.g. #!/usr/bin/env -S guix shell python -- python3

Joseph Holsten

@wingo Interesting it isn’t in posix: pubs.opengroup.org/onlinepubs/

Seems like it should get added, I can’t thing of a reasonable workaround.

zardoz.el

@josephholsten @wingo
the "reasonable" work around is autotools patching the install location :)))

Marek, lost in computation

@wingo It's a cool feature to work around the absolutely nonsense way it works by default. Like who thought that smashing the whole line into `argv[1]` is sensible?

James Henstridge

@leonidas @wingo The #! parsing happens within the kernel. If you start splitting arguments on spaces, which other shell features should the kernel implement? Quoting? Backslash escapes? Environment variable expansion?

Marek, lost in computation

@jamesh @wingo That's a fair point, but then the ball is in the court of `env` why it wouldn't implement something like `-S` by default.

Andy Wingo

@jamesh @leonidas quoting and backslash for quotes. not all slopes are slippery :)

Felix Lechner

@wingo Unfortunately, the line length is limited. Here is my preambled-exec, for entire Guile snippets. It is an env on steroids. codeberg.org/lechner/preambled

Go Up