Re:dotnet run app.cs
by higherhalf on Thursday May 29, 2025 @04:19PM
(#44129928)
Thanks, I looked it up and it's indeed quite ugly, and my shebang isn't portable. A little saddened that even 'env -S' didn't make it to POSIX.
Re:dotnet run app.cs
by ComputerGuru on Thursday May 29, 2025 @05:41PM
(#44130668)
No worries and believe me, I feel your pain (I moonlight as a (fish-)shell dev).
I would have liked to use `exec -a` to set the executable name (as mentioned in the comments on the article) but alas, that too is not portable.
Shell scripts are ugly :)
(If you didn't mean to use them in a shebang but rather as the script body, that's fine but that wouldn't be possible without the polyglot syntax and #allow abuse I posted.)