diff --git a/Readme.md b/Readme.md index cdbd97df2..4b37c47e7 100644 --- a/Readme.md +++ b/Readme.md @@ -330,7 +330,7 @@ For information about possible ambiguous cases, see [options taking varying argu ### Required option -You may specify a required (mandatory) option using `.requiredOption`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing. +You may specify a required (mandatory) option using `.requiredOption()`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option()` in format, taking flags and description, and optional default value or custom processing. Example file: [options-required.js](./examples/options-required.js) @@ -441,6 +441,8 @@ $ extra --disable-server --port 8000 error: option '--disable-server' cannot be used with option '-p, --port ' ``` +Specify a required (mandatory) option using the `Option` method `.makeOptionMandatory()`. This matches the `Command` method [.requiredOption()](#required-option). + ### Custom option processing You may specify a function to do custom processing of option-arguments. The callback function receives two parameters,