Martijn Dekker dixit: >Thorsten Glaser schreef op 26-02-16 om 21:57: >> In the end, I decided I don’t like the code and rewrote it entirely, >> separating options processing, simplifying, etc. but thanks anyway! > >Yes, that code looks much cleaner. No more opaque mixing of two >different command's option logic.
Indeed. echo/print still does it, but (after my cleanup) is at least legible. >I also submitted a patch to OpenBSD ksh for this and in the process I >wrote a couple of more robust regression tests, one to make sure >'command' behaves correctly and the other to check 'whence' behaviour >hasn't changed. Here they are as a patch against mksh, latest cvs. (They >pass.) Thanks! I thought of writing some, but I didn’t do because I had mental trouble writing them in a way that works on all mksh targets. I think I’ll mark your second test as MirBSD-only after moving true from /usr/bin to /bin where we have it, this way the logic gets full coverage but we only run the portable test elsewhere. bye, //mirabilos -- [...] if maybe ext3fs wasn't a better pick, or jfs, or maybe reiserfs, oh but what about xfs, and if only i had waited until reiser4 was ready... in the be- ginning, there was ffs, and in the middle, there was ffs, and at the end, there was still ffs, and the sys admins knew it was good. :) -- Ted Unangst über *fs