3 ms·
https://svnweb.freebsd.org/base?view=revision&revision=146731 https://svnweb.freebsd.org/base?view=revision&revision=14673...
by JdeBP 8y ago
https://svnweb.freebsd.org/base?view=revision&revision=146731 https://svnweb.freebsd.org/base?view=revision&revision=14673...
- jolmg 8y agoSo they did it for compatibility. In the end, it seems better to take everything as 1 argument instead of simply splitting on spaces, without having support for quoting and escaping. That way you can have arbitrary code with spaces in the shebang if that's ever a good idea.
- jessaustin 8y agoIt is probably silly to dream that kernels will change their behavior, if FreeBSD had to revert such an improvement. However as you describe env is actually downstream of the kernel, so if it were improved we could envision shebangs like the following: #!/usr/bin/env --new-env-behavior-parse-all-args=bash -e Some people might prefer a less verbose flag, but perhaps making it extra-yucky would improve adoption?