From adee84763e1b05c83a9ad1445f24bc24e3ad2330 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 20 Dec 2018 15:28:24 +0300 Subject: [PATCH] tweaking cli... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/cli.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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(){