On Fri, Aug 21, 2020 at 10:31:42PM -0700, Will Yardley wrote:
If anyone's an expert on shell portability, open to any suggestions
/ major concerns...but I know we have a conservative, and opinionated,
audience here.
(Not an expert, just an enthusiast...!)
This is great, thanks very much for doing this. I can see a few cases
remaining where it would be a good idea to "$double_quote" some
variables, and some other details. I'll have a look tomorrow, and I'm
interested in general in helping out.
I think that $() (vs. backticks) and "grep -E" should be POSIX
compliant from what I've been able to dig up
POSIX has guaranteed (and recommended) $(parens) over `backticks` for
command substitution for a long time. However people are probably
building Mutt on some pretty weird and/or old systems out there. It
does seem a wise move to try it, though. `grep -E` is similarly
long-standardised, but can often be avoided anyway with a little work.
For portability concerns for really old shells, Sven Mascheck maintains
an astonishingly thorough guide to Bourne shell features here:
<https://www.in-ulm.de/~mascheck/bourne/>
--
Tom Ryder <https://sanctum.geek.nz/>
Maybe we can bring back the light.