You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following subcommand defined within the file litoria-generate.js script setup the usage
var program = require('commander'),
$ = require('../lib/litoria.js');
program
.description('generate html from the asciidoc file using html5 as backend')
.usage('litoria <generate> [options]')
.option('-b, --backend', 'backend - html5, docbook')
.parse(process.argv);
as such
.usage('litoria <generate> [options]')
But when I call the help for that subcommand, the usage is prefixed with the name of the file litoria-generate.
Usage is prefixed with the name property of the command, which defaults to the file name. I created a PR to make this settable through a chainable function: #605
As a (hacky) workaround, you can currently just override _name, but you probably shouldn't rely on that, as it's not part of the intended API:
var program = require('commander');
program._name = 'litoria generate';
program
.description('generate html from the asciidoc file using html5 as backend')
.usage('litoria <generate> [options]')
.option('-b, --backend', 'backend - html5, docbook')
.parse(process.argv);
The following subcommand defined within the file
litoria-generate.jsscript setup the usageas such
But when I call the help for that subcommand, the usage is prefixed with the name of the file
litoria-generate.Is there a workaround to only display for the subcommand the command defined within the subcommand usage ?
The text was updated successfully, but these errors were encountered: