Process application arguments the same way as getopt_long