Automated --flag and -flag parsing