$ set -- $(getopt ab:c "$@") $ echo $?
POSIX mandates this to show 0, but traditional mode passes through the errorlevel from the getopt(1) command.
https://www.mirbsd.org/mksh.htm
https://www.mirbsd.org/ksh-chan.htm
tries to make a cross between a legacy bourne/posix compatibl-ish shell and a legacy pdksh-alike but ``legacy'' is not exactly specified.
The set built-in command does not have all options one would expect from a full-blown mksh or pdksh
Talk to the MirOS development team using the mailing list at Aq miros-mksh@mirbsd.org or the #!/bin/mksh (or #ksh ) IRC channel at irc.freenode.net (Port 6697 SSL, 6667 unencrypted) if you need any further quirks or assistance, and consider migrating your legacy scripts to work with mksh instead of requiring .