diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-11-29 06:31:58 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-11-29 06:31:58 -0800 |
commit | 9bce2edc80960948b4d33a4931395b28cd5931d6 (patch) | |
tree | 7406946e1e0c8a7e3dbf53a2d08ecf73feeabaf5 | |
parent | efd63397acfae905ee2d8031fd84d3a821a04fce (diff) | |
download | txr-9bce2edc80960948b4d33a4931395b28cd5931d6.tar.gz txr-9bce2edc80960948b4d33a4931395b28cd5931d6.tar.bz2 txr-9bce2edc80960948b4d33a4931395b28cd5931d6.zip |
doc: getopt: long and short options appear in index.
* txr.1: Document that in the parsed opts object returned by
getopts, an option which has two names (long and short form)
is indexed under both names if it has occurred in the command
line, regardless of whether it has occurred under the short or
long name.
-rw-r--r-- | txr.1 | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -56913,6 +56913,23 @@ is possible. This replaces the value associated with option The assignment is erroneous if no such option was parsed from the command line, even if it is a valid option. +If an option is defined with both a long form and a short form, +and either form of that option occurs in the command line being +processed, then the option appears under both names in the index. + +For instance if option +.str --verbose +has the short form +.strn -v , +and either option occurs, then both the keys +.str "v" +and +.str "verbose" +will exist in the +.code opts +structure returned by +.codn getopts . + .coNP Function @ getopts .synb .mets (getopts < option-desc-list << arg-list ) |