Options (2)
-o, --optionsbooleanParse optional `verbose`/`version` flags with shorthands
Example:
getopt {{[-o|--options]}} vV {{[-l|--longoptions]}} verbose,version -- --version --verbose-l, --longoptionsbooleanParse optional `verbose`/`version` flags with shorthands
Example:
getopt {{[-o|--options]}} vV {{[-l|--longoptions]}} verbose,version -- --version --verboseExamples (4)
Parse optional `verbose`/`version` flags with shorthands
getopt [-o|--options] vV [-l|--longoptions] verbose,version -- --version --verboseAdd a `--file` option with a required argument with shorthand `-f`
getopt [-o|--options] f: [-l|--longoptions] file: -- --file=somefileAdd a `--verbose` option with an optional argument with shorthand `-v`, and pass a non-option parameter `arg`
getopt [-o|--options] v:: [-l|--longoptions] verbose:: -- --verbose argAccept a `-r` and `--verbose` flag, a `--accept` option with an optional argument and add a `--target` with a required argument option with shorthands
getopt [-o|--options] rv::s::t: [-l|--longoptions] verbose,source::,target: -- -v --target targetmade by @shridhargupta | data from tldr-pages