3 ms·
Well, to be fair, the first sentence in OPTIONS is: > All of the single-character shell options documented in the description of the set builtin command can be
by jolmg 9y ago
Well, to be fair, the first sentence in OPTIONS is:
> All of the single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked.
It's easy to miss though, when one's accustomed to quickly searching with "/".
EDIT: On the imagined env, it might be possible. I wonder what aspects of shebangs are portable across the various unix derived OSs. It may be that there's some systems where it only takes non-whitespace characters as the first argument and drops everything else after encountering another space. There might be also other limitations that one should consider when making more use of shebangs, like the character limit of the lines. For example, I think linux only takes the first 127 characters of the shebang and ignores everything else; other systems might take less. I encountered that limit when writing this answer:
https://unix.stackexchange.com/questions/365436/choose-interpreter-after-script-start-e-g-if-else-inside-hashbang/365751#365751 https://unix.stackexchange.com/questions/365436/choose-inter...
EDIT 2: If you were to do such a program, it will probably also need to implement quoting and escaping syntax. The difficult part is that, since it wouldn't be a standard program to have, it'd have to be listed as a dependency of whatever projects you use it in, and I wonder if the benefit really outweighs the cost of having yet another dependency. I can't see something like this gaining wide adoption.
- jessaustin 9y agoHaha thanks that is why I missed it.