tweaking cli...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-12-20 15:28:24 +03:00
parent 755a2696ed
commit adee84763e

View File

@ -120,6 +120,13 @@ var logger = {
var CLIActions = actions.Actions({ var CLIActions = actions.Actions({
get cli_commands(){
return this.actions
.filter(function(action){
return this.getActionAttr(action, 'cli') }.bind(this)) },
// XXX should this be here??? // XXX should this be here???
// ...move this to progress... // ...move this to progress...
__progress: null, __progress: null,
@ -159,6 +166,7 @@ var CLIActions = actions.Actions({
makeIndex: ['- System/', makeIndex: ['- System/',
{cli: true},
function(path){ function(path){
var that = this var that = this
@ -260,6 +268,10 @@ module.CLI = core.ImageGridFeatures.Feature({
} }
}) })
.option('l, --list-commands', 'list commands', function(){
console.log('Commands:\n ', that.cli_commands.join('\n\t'))
})
// list features... // list features...
// XXX make this a core action... (???) // XXX make this a core action... (???)
.option('lf, --list-features', 'list loaded features', function(){ .option('lf, --list-features', 'list loaded features', function(){