i have been developing on (gnu/)linux for, um, a long time now, and i just now learned about /usr/bin/env -S https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#g_t_002dS_002f_002d_002dsplit_002dstring-usage-in-scripts
Andy Wingo
i have been developing on (gnu/)linux for, um, a long time now, and i just now learned about /usr/bin/env -S https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#g_t_002dS_002f_002d_002dsplit_002dstring-usage-in-scripts 16 comments
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: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/env.html Seems like it should get added, I can’t thing of a reasonable workaround.
zardoz.el
@josephholsten @wingo
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
Marek, lost in computation
Felix Lechner
@wingo Unfortunately, the line length is limited. Here is my preambled-exec, for entire Guile snippets. It is an env on steroids. https://codeberg.org/lechner/preambled-exec |
@wingo wow that's very smart