diff --git a/lib/commands.js b/lib/commands.js index 5cb3273..38fdcea 100644 --- a/lib/commands.js +++ b/lib/commands.js @@ -21,7 +21,10 @@ var schema = function(cb){ result.use = (parent.join(" ")+" "+data.name).trim(); if(data.subcommands&&data.subcommands.length){ for(var i =0,sub; sub=data.subcommands[i++];){ + result[sub.name.replace("-","_")]=parseCLI(sub,result.use.split(" ")); + if(sub.name.indexOf('-')!=-1) + result[sub.name]=result[sub.name.replace("-","_")]; } }else{ result.endpoint=true;