Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Bettison
2d4133315d Improve cli_arg() diagnostic log messages 2013-02-14 16:00:47 +10:30
Andrew Bettison
e86a129d49 Refactor: rename some cli.h structs
Now all symbols defined in cli.h start with or contain "cli_"
2013-02-13 17:43:24 +10:30
Andrew Bettison
7f52ac0ae3 Improve command-line parser
Support prefix<any>, prefix=<any>, prefix <any>, [prefix<any>], [prefix=<any>]
and [prefix <any>] argument syntax forms.

Support [arg]... optional repeated argument syntax.
2013-02-13 15:55:00 +10:30
Andrew Bettison
fcb6600cd6 Rewrite command-line parser
Now supports optional args followed by non-optional.
2013-02-12 18:00:37 +10:30
Andrew Bettison
71ed78e058 Make all 'config' tests pass
Change a test case: configuration options are now case sensitive.

Fix config file load and parse logic in conf.c, always copy 'debug' flags
from config.debug.

The config schema 'interfaces' option is no longer MANDATORY.

Introduce new CLIFLAG_PERMISSIVE_CONFIG to supress bad-config ERROR messages
from the 'config set' and 'config get' commands.

Refactor cli_execute() into cli_parse() and cli_invoke().  Use *const* struct
command_line_option everywhere.
2012-12-04 16:52:49 +10:30
Jeremy Lakeman
ac3864ff20 Reuse command line parsing framework with monitor interface 2012-09-25 13:31:34 +09:30