Hi.
I think Ygor's suggestion is relatively easy to implement and useful to know about.
However, there are those extra actions with which getopts-like facilities can help us -- error messages, shifting, etc.
There is a shell version of
getopt that can process long options. See
Bash long options and Python s-expression parser for details ... cheers, drl