3 ms·
So you want it to compile to POSIX sh but you're unhappy it doesn't use more POSIX-incompatible features? Maybe full POSIX sh compat is WIP, or in some simpler
by nick238 2y ago
So you want it to compile to POSIX sh but you're unhappy it doesn't use more POSIX-incompatible features? Maybe full POSIX sh compat is WIP, or in some simpler cases maybe it already is?
- olejorgenb 2y agoRetr0id, not sgarland want posix. > Maybe full POSIX sh compat is WIP Still - I sure hope it's possible to do a comparison in sh without spawning two processes.
- sgarland 2y agoAs I've just updated my comment to reflect, TIL that parameter substitution is supported (with some exceptions) by `sh`. More broadly though, yes, there's a tendency for people to pop sub-shells without giving it a second thought. Those aren't free; use shell built-ins whenever possible!