Getopt != getopts


Here’s another ‘aha moment’ I got recently. I wanted to share it with you since writing kak scripts often implies to mess with shell/tools details.

getopt and getopts (notice the ending s) are closely related beasts, but as usual have a few discrepancies! I never really pay attention that they were different stuffs and I’ll let the Wikipedia articles explain them better than I could:


Cliffsnotes some of the difference you stumbled onto? (/lazy /packing_for_rome)