Skip to content

Commit

Permalink
created a cross reference for commands with dashes in their name
Browse files Browse the repository at this point in the history
  • Loading branch information
gtg092x committed May 15, 2014
1 parent f995721 commit d0a303a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0a303a

Please sign in to comment.