coa
coa copied to clipboard
Command-Option-Argument: Get more from defining your command line interface
``` arikon-osx% bem create -l \"Calibre\ Library/\" \"Calibre\ Library/\" .gitconfig ``` There should be now `\` before `"`.
Prerequisites: ``` .arg() .name('name') .title('some description') .req() .end() ``` Bug: Pass `""` as an argument -> error: ``` Missing required argument: NAME : some description (required) ``` UPD: Empty string...
``` js cmd.opt() .name('format') .title('Output format: html, bemjson. Defaults to html') .short('f') .long('format') .def('html') .val(function(value) { // FIXME: don't use private API _usage() !value && this.end().errorExit("Missing required option value\n" +...
https://github.com/veged/coa/pull/65/files#diff-9b68c4a55c42412a8de85d41de6520feR154
Should you more precise one from `karma` for example. ``` sh ###-begin-karma-completion-### # # karma command completion script # This is stolen from NPM. Thanks @isaac! # # Installation: karma...
My proposal it to change API of `.act()` callbacks from ``` js function(opts, args) { } ``` to ``` js function(options) { // options = opts + args } ```...
We could implement `fsPath(glob)` (or something) helper for `Opt` and `Arg` that will add shell completion for the opt/arg on fs paths.