lib/gcli/commands/help.js
function getSubCommands(context, command) {
  var commands = cli.getMapping(context).requisition.system.commands;
  var subcommands = commands.getAll().filter(function(subcommand) {
    return subcommand.name.indexOf(command.name) === 0 &&
           subcommand.name !== command.name &&
           !subcommand.hidden;
  });

  subcommands.sort(function(c1, c2) {
    return c1.name.localeCompare(c2.name);
  });

  subcommands = subcommands.map(function(subcommand) {
    return subcommand.toJson();
  });

  return subcommands;
}
function getSubCommands(context, command) {
  var commands = cli.getMapping(context).requisition.system.commands;
  var subcommands = commands.getAll().filter(function(subcommand) {
    return subcommand.name.indexOf(command.name) === 0 &&
           subcommand.name !== command.name &&
           !subcommand.hidden;
  });

  subcommands.sort(function(c1, c2) {
    return c1.name.localeCompare(c2.name);
  });

  subcommands = subcommands.map(function(subcommand) {
    return subcommand.toJson();
  });

  return subcommands;
}
function getSubCommands ( context , command ) { var commands = cli . getMapping ( context ) . requisition . system . commands ; var subcommands = commands . getAll ( ) . filter ( function ( subcommand ) { return subcommand . name . indexOf ( command . name ) === 0 && subcommand . name !== command . name && ! subcommand . hidden ; } ) ; subcommands . sort ( function ( c1 , c2 ) { return c1 . name . localeCompare ( c2 . name ) ; } ) ; subcommands = subcommands . map ( function ( subcommand ) { return subcommand . toJson ( ) ; } ) ; return subcommands ; }
Find all the sub commands of the given command
Find all the sub commands of the given command