swift-argument-parser icon indicating copy to clipboard operation
swift-argument-parser copied to clipboard

Improved documentation for parseAsRoot

Open msalmonse opened this issue 4 years ago • 0 comments

When I read "Manual Parsing and Testing" I got the impression that parseAsRoot would only ever return one of the Math subcommands but I discovered that that wasn't the case when I tried using it. When I went looking to find out why -h stopped working for me I found that a HelpCommand was returned by parseAsRoot. It worked in your example as you execute the run method of the command in the default case of the switch.

I believe that a short note to that effect would help others.

Also, in the example variance is calculated as the sum of the squared errors when it is actually the mean.

msalmonse avatar Apr 14 '21 12:04 msalmonse