From 9a3b048b9f7ae26f9902a6f91f01ff332a7e19dc Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 15 Jan 2015 11:18:34 -0300 Subject: [PATCH] Move help facade to help actions module --- lib/actions/help.coffee | 6 ++++++ lib/app.coffee | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/actions/help.coffee b/lib/actions/help.coffee index 368cebd2..73bcf147 100644 --- a/lib/actions/help.coffee +++ b/lib/actions/help.coffee @@ -110,3 +110,9 @@ exports.command = (params) -> log.out(getOptionHelp(option, optionSignatureMaxLength)) log.out() + +exports.help = (params) -> + if params.command? + exports.command(arguments...) + else + exports.general(arguments...) diff --git a/lib/app.coffee b/lib/app.coffee index da618304..f84eeaa4 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -15,11 +15,7 @@ capitano.command capitano.command signature: 'help [command...]' description: 'show help' - action: (params) -> - if params.command? - actions.help.command(params) - else - actions.help.general() + action: actions.help.help capitano.command signature: '*'