chickadee » chibi-app » parse-option

parse-option prefix conf-spec args types failprocedure

Parse a single command-line argument from args according to conf-spec,and returns a list of two values: the (name value) for the option, and a list of remaining unparsed args. name will have the current prefix prepended. If a parse error or unknown option is found, calls fail with a single string argument describing the error, returning that result.