From be77bb1a95eb9eaf283c99e713e3d0aece18f5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Haraldsson?= Date: Sat, 16 Apr 2022 14:48:16 +0000 Subject: [PATCH] Fix typo [skip ci] --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3a67468..2d69de3 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ # QuickArgParse -Fast command line argument parsing in Julia. No bells and whistles. +Fast command-line argument parsing in Julia. No bells and whistles. -When QuickArgParse is used to parse command line arguments, required arugments must be provided in order +When QuickArgParse is used to parse command-line arguments, required argments must be provided in order before optional arguments. Optional arguments are preceded by -- Flags are preceded by a single - and must be single letter. Their value is false by default, -and changes to true if the flag is included as a command line argument (ie -w). +and changes to true if the flag is included as a command-line argument (i.e. -w). ### Example All inputs except the req vector are optional. ```Julia -req = ["Arg1","Arg2"] -reqhelp = ["First Argument","Second Argument"] -opts= ["opt1","opt2"] -optsHelp = ["First optional argument","Second optional argument"] -optsDefault = ["opt1Default",28] +req = ["Arg1", "Arg2"] +reqhelp = ["First Argument", "Second Argument"] +opts= ["opt1", "opt2"] +optsHelp = ["First optional argument", "Second optional argument"] +optsDefault = ["opt1Default", 28] flags = ["w"] flagHelp = ["a flag, value is always true/false (default false)"] title = "Example usage statement" desc = "A demo version of a usage statement showing the code required to generate it" #process the input vectors -R = process_reqs(req;reqHelp=reqhelp,flags=flags,flagHelp=flagHelp,title=title,desc=desc, - optTag=opts,optHelp=optsHelp,optDefault=optsDefault) +R = process_reqs(req; reqHelp=reqhelp, flags=flags, flagHelp=flagHelp, title=title, desc=desc, + optTag=opts, optHelp=optsHelp, optDefault=optsDefault) #build a usage statement string build_usage!(R) @@ -34,7 +34,7 @@ build_usage!(R) A = parse_args(R) ``` -The resulting dict A contains the values for all command line arguments, keyed by the string +The resulting Dict A contains the values for all command line arguments, keyed by the string variable specified in the input vectors to process_reqs (ie "Arg1", "opt1", "w"). If optional argument names are provided (the opt vector), default values must also be provided (optsHelp). These can be any type. @@ -56,7 +56,5 @@ These can be any type. > --opt1 < opt1Default > : First optional argument > --opt2 < 28 > : Second optional argument > ->\# Optional Flags +>\# Optional Flags > -w : a flag, value is always true/false (default false) - -