From 5e18463f8b343d507b11b361d62e0720fbb5a884 Mon Sep 17 00:00:00 2001 From: mwalker33 Date: Sat, 3 Oct 2020 11:34:33 +1000 Subject: [PATCH] Update cliparser.md Added 0 or 1 string option a little formatting. --- doc/cliparser.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/cliparser.md b/doc/cliparser.md index 83002dda4..044f8f8e3 100644 --- a/doc/cliparser.md +++ b/doc/cliparser.md @@ -6,14 +6,15 @@ Note: the parser will format and color and layout as needed. -## common options -where possiable all options should be lowercase. -extended options preceeded with -- should be short -options provided directly (without an option identifier) should be avoided. --vv for extra verbos should be avoided; use of debug level is prefered. -whith --options the equle is not needed (will work with and without) so dont use '=' -e.g. cmd --cn 12345 +## design comments +* where possiable all options should be lowercase. +* extended options preceeded with -- should be short +* options provided directly (without an option identifier) should be avoided. +* -vv for extra verbos should be avoided; use of debug level is prefered. +* with --options the equal is not needed (will work with and without) so dont use '=' + e.g. cmd --cn 12345 +## common options -h --help : help --cn : card number --fn : facility number @@ -61,13 +62,21 @@ e.g. lf indala clone -r a0000000a0002021 -> this uses ..... }; **Notes:** -booleen : arg_lit0 ("\", "\", \["\",\] \<"description"\>); -optional integer : arg_int0 ("\", "\", \["\",\] \<"description"\>); -required integer : arg_int1 ("\", "\", \["\",\] \<"description"\>); -optional string : arg_strx0 ("\", "\", \["\",\] \<"description"\>); -required string : arg_strx1 ("\", "\", \["\",\] \<"description"\>); +booleen : arg_lit0 ("\", "\", \["\",\] \<"description"\>) -** if an option does not have a short or long option, use NULL in its place. ** +**integer** + optional integer : arg_int0 ("\", "\", \["\",\] \<"description"\>)\ + required integer : arg_int1 ("\", "\", \["\",\] \<"description"\>) + +**Strings 0 or 1** + optional string : arg_str0("\", "\", \["\",\] \<"description"\>)\ + required string : arg_str1("\", "\", \["\",\] \<"description"\>) + +**Strings x to 250** + optional string : arg_strx0 ("\", "\", \["\",\] \<"description"\>)\ + required string : arg_strx1 ("\", "\", \["\",\] \<"description"\>) + +**if an option does not have a short or long option, use NULL in its place** ### show the menu CLIExecWithReturn(\, \, \, \);