diff --git a/ui (gen4)/features/cli.js b/ui (gen4)/features/cli.js index 38bfb39f..4d534388 100755 --- a/ui (gen4)/features/cli.js +++ b/ui (gen4)/features/cli.js @@ -120,6 +120,13 @@ var logger = { 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??? // ...move this to progress... __progress: null, @@ -159,6 +166,7 @@ var CLIActions = actions.Actions({ makeIndex: ['- System/', + {cli: true}, function(path){ 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... // XXX make this a core action... (???) .option('lf, --list-features', 'list loaded features', function(){