Command line parsing mess
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Dan Buch 871b7aa4f0
Collapse together Command and Flag into CommandFlag
3 weeks ago
cmd/argh-example Add support for "event"-like interface to parsing 3 weeks ago
.gitignore Reduce required args to new parser 6 months ago
Makefile Add support for "event"-like interface to parsing 3 weeks ago
README.md Add support for "event"-like interface to parsing 3 weeks ago
argh.go Add support for "event"-like interface to parsing 3 weeks ago
argh_test.go Collapse together Command and Flag into CommandFlag 3 weeks ago
ast.go Collapse together Command and Flag into CommandFlag 3 weeks ago
go.mod Add a Makefile and update/alter deps 5 months ago
go.sum Add a Makefile and update/alter deps 5 months ago
node.go Collapse together Command and Flag into CommandFlag 3 weeks ago
nvalue_string.go Handle bare assignments as syntax error + NValue rework 7 months ago
parser.go Collapse together Command and Flag into CommandFlag 3 weeks ago
parser_config.go Collapse together Command and Flag into CommandFlag 3 weeks ago
parser_error.go Renaming some error list bits & testing windows-like 6 months ago
parser_test.go Collapse together Command and Flag into CommandFlag 3 weeks ago
scanner.go Continuing the work with parser that's more like go/parser 6 months ago
scanner_config.go Continuing the work with parser that's more like go/parser 6 months ago
scanner_test.go A bit more coverage + say things in README 5 months ago
token.go Continuing the work with parser that's more like go/parser 6 months ago
token_string.go Making a mess with a parser that works more like go/parser 6 months ago

README.md

argh command line parser

background

The Go standard library flag way of doing things has long been a source of frustration while implementing and maintaining the urfave/cli library. Many alternate parsers exist, including:

In addition to these other implementations, I also got some help via this oldie and the Go standard library parser.

goals

  • get a better understanding of the whole problem space
  • support both POSIX-y and Windows-y styles
  • build a printable/JSON-able parse tree
  • support rich error reporting
  • support event-like reactive parsing