clibs / commander Goto Github PK
View Code? Open in Web Editor NEWCommander option parser ported to C - simple API, auto-generated --help
Commander option parser ported to C - simple API, auto-generated --help
maybe, pretty easy to do on your own
In the test.c
, I found the API calls are the same.
Hi,
If an user want to omit the short version of a option (defining as empty string),
the help ended up with a ,
at the beginning of the option's line.
-q, --quiet disable verbose output
, --manifest <filename> give a manifest of the manifest file. (default: package.json)
Should it be possible to omit the short version?
If you want to have a program that has a negative number for an arg, commander.c causes a segfault.
./myprog --n -5
or...
./myprog -n "-5"
Any thoughts on why?
I'd like the option to disable the commander built-in arguments. There are a few cases were they're not useful at all.
Thoughts?
Is there a license (e.g. MIT, Apache, GPL) under which you are releasing this?
Not sure why 56deac2 happened, but it broke the makefile:
stephen@sm:~/repos/commander$ uname -a
Linux sm 3.2.0-32-virtual #51-Ubuntu SMP Wed Sep 26 21:53:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
stephen@sm:~/repos/commander$ make
cc test.c src/commander.c -o test -Wall -Wextra
test.c: In function ‘main’:
test.c:29:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
test.c:29:3: note: use option -std=c99 or -std=gnu99 to compile your code
src/commander.c: In function ‘normalize_args’:
src/commander.c:148:7: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/commander.c:148:7: note: use option -std=c99 or -std=gnu99 to compile your code
make: *** [test] Error 1
Possibly something like:
commant_action_t *cmd = command_action(&program, "cmd", cmd_fn);
I receive this error when I attempt to set and optional argument in mon.
example
mon -d -l ./var/log/some.log ...
to append to what's already there, for documenting sub-commands etc
It would be neat if commander accepted function pointers as filters:
...
command_t program;
command_init(&program, argv[0], "0.0.1");
command_use(&program, some_argv_filter);
command_use(&program, another_argv_filter);
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.