homebrew-getoptions getoptions is an elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)