From c59f57ecd787035b3ba701f719ea0a469d31e101 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 29 Jul 2020 21:09:50 +0300 Subject: [PATCH] cleanup... Signed-off-by: Alex A. Naanou --- README.md | 12 ++++++++++++ argv.js | 43 ++++++++++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 80b7eea..44c33e8 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,9 @@ var parser = argv.Parser({ arg: '| required_option_given', required: true, + + // keep this near the top of the options list in -help... + priority: 80, }, @@ -422,6 +425,12 @@ Ordering is as follows: Note that options and commands are grouped separately. +The built-in options `-help`, `-version` and `-quiet` have a priority +of `99` so that they appear the the top of the `-help` list. + +Any option defining `.required` and not defining an explicit `.priority` +will be sorted via `.requiredOptionPriority` (`80` by default). + #### `