implement short option parsing in local getopt replacement