Gives help.

    Syntax: {command} [command]
777574
def cmd(send, msg, args):
    
    cmdchar = args['config']['core']['cmdchar']
    if msg:
        if msg.startswith(cmdchar):
            msg = msg[len(cmdchar):]
        if len(msg.split()) > 1:
            send("One argument only")
        elif not command_registry.is_registered(msg):
            send("Not a module.")
        else:
            doc = command_registry.get_command(msg).get_doc()
            if doc is None:
                send("No documentation found.")
            else:
                for line in doc.splitlines():
                    send(line.format(command=cmdchar + msg), target=args['nick'])
    else:
        modules = sorted(command_registry.get_enabled_commands())
        cmdlist = (' %s' % cmdchar).join(modules)
        send('Commands: %s%s' % (cmdchar, cmdlist), target=args['nick'], ignore_length=True)
        send('%shelp <command> for more info on a command.' % cmdchar, target=args['nick'])
734061
function _preCommand(commands) {
  commander.on('--help', function () {

    var hasExample = _.map(_.values(commands), 'examples')
      .filter(function (elem) {
        return elem !== undefined;
      });
    if (hasExample.length > 0) {
      hasExample = hasExample.reduce(function (a, b) {
        return a.concat(b);
      });
    }
    hasExample = hasExample.length > 0;

    if (hasExample) {

      console.log('  Examples:\n');

      Object.keys(commands).forEach(function (command) {
        if (!_.isEmpty(commands[command].examples)) {
          console.log('    %s:', command);
          commands[command].examples.forEach(function (example) {
            console.log('      %s', example);
          });
        }
      });
    }
  });
}
1149868
function cmd(handlers)
{
  this.fieldindex = 0;
  this.state = "start";
  this.stmt = ""
  this.params = []

  // mixin all handlers
  for (var h in handlers)
  {
    this[h] = handlers[h];
  }
  // save command name to display in debug output
  this.command_name = cmd.caller.command_name;
  this.args = Array.prototype.slice.call(cmd.caller.arguments);
}
685185
def command_help_long(self):
    
    indent = " " * 2 # replace with current_indent
    help = "Command must be one of:\n"
    for action_name in self.parser.valid_commands:
      help += "%s%-10s %-70s\n" % (indent, action_name, self.parser.commands[action_name].desc_short.capitalize())
    help += '\nSee \'%s help COMMAND\' for help and information on a command' % self.parser.prog
    return help
805077
def complete_command_help(self, tokens: List[str], text: str, line: str, begidx: int, endidx: int) -> List[str]:
        """"""
        for idx, token in enumerate(tokens):
            if idx >= self._token_start_index:
                if self._positional_completers:
                    # For now argparse only allows 1 sub-command group per level
                    # so this will only loop once.
                    for completers in self._positional_completers.values():
                        if token in completers:
                            return completers[token].complete_command_help(tokens, text, line, begidx, endidx)
                        else:
                            return self._cmd2_app.basic_complete(text, line, begidx, endidx, completers.keys())
        return []
1090375
function defaultCommand() {
    if (keys.length <= 0) {
        throw new Error("Error: there is no command at all!");
    };

    for (var p in commands) {
        if (commands[p]["default"]) {
            return commands[p];
        };
    };

    if (keys["--help"]) {
        return commands["--help"];
    } else {
        return commands[keys[0]];
    };
}
270669
def cmd_help(*args):
    
    if len(args) == 0:
        print("Possible commands are:")
        print("")
        for cmd_name in sorted(COMMANDS.keys()):
            cmd_func = COMMANDS[cmd_name]
            print("{}:".format(cmd_name))
            print("=" * (len(cmd_name) + 1))
            print("    {}".format(cmd_func.__doc__.strip()))
            print("")
    else:
        cmd_name = args[0]
        cmd_func = COMMANDS[cmd_name]
        print("{}:".format(cmd_name))
        print("=" * (len(cmd_name) + 1))
        print("    {}".format(cmd_func.__doc__.strip()))
924271
function(cb){
      o.command("help",function(err,help){
        cb(err,help?help.indexOf('hq.bridge') > -1:false);
      });
    }
644122
def command_help(self, *args, **kwargs):
        """"""
        print("Commands available:\n")
        for name in dir(self):
            if not name.startswith("command_"):
                continue
            name_clean = name[len("command_"):]
            print("%s:\n - %s\n" % (name_clean, getattr(self, name).__doc__.strip()))
943439
def help(self, command=None):
        
        cmd = 'help'
        if command: cmd += ' %s' % command
        return self.fetch(cmd)[1]
127023
def help(self):
        ''''''
        cmds = self.get_exposed_cmds()
        t = text_helper.Table(fields=['command', 'doc'],
                              lengths=[50, 85])
        return t.render((reflect.formatted_function_name(x), x.__doc__, )
                        for x in cmds.values())
1086700
function outputHelpIfNecessary(cmd, options) {
  options = options || [];
  for (var i = 0; i < options.length; i++) {
    if (options[i] == '--help' || options[i] == '-h') {
      process.stdout.write(cmd.helpInformation());
      cmd.emit('--help');
      process.exit(0);
    }
  }
}
742382
def help(self, command=None):
    '''

    '''
    from spython.utils import check_install
    check_install()

    cmd = ['singularity','--help']
    if command != None:
        cmd.append(command)
    help = self._run_command(cmd)
    return help
1151007
def _commands(ctx):
    """"""
    ctx = ctx.parent
    ctx.show_hidden_subcommands = False
    main = ctx.command

    for subcommand in main.list_commands(ctx):
        cmd = main.get_command(ctx, subcommand)
        if cmd is None:
            continue
        help = cmd.short_help or ""
        click.echo("{}:{}".format(subcommand, help))
411804
def cmd_help(self, *args):
        
        if len(args) > 0:
            cmdname = args[0].lower()
            try:
                method = getattr(self, "cmd_" + cmdname)
                doc = method.__doc__
                if doc is None:
                    self.log("Sorry, no documentation found for '%s'" % (
                        cmdname))
                else:
                    self.log("%s: %s" % (cmdname, doc))
            except AttributeError:
                self.log("No such command '%s'; type help for general help." % (
                    cmdname))
        else:
            res = []
            for attrname in dir(self):
                if attrname.startswith('cmd_'):
                    method = getattr(self, attrname)
                    doc = method.__doc__
                    cmdname = attrname[4:]
                    if doc is None:
                        doc = "no documentation"
                    res.append("%s: %s" % (cmdname, doc))
            self.log('\n'.join(res))
361262
def main():
    
    command = Command.lookup(args.get(0))

    if len(args) == 0 or args.contains(('-h', '--help', 'help')):
        display_info(args)
        sys.exit(1)

    elif args.contains(('-v', '--version')):
        display_version()
        sys.exit(1)

    elif command:
        arg = args.get(0)
        args.remove(arg)
        command.__call__(command, args)
        sys.exit()

    else:
        show_error(colored.red('Error! Unknown command \'{0}\'.\n'
                               .format(args.get(0))))
        display_info(args)
        sys.exit(1)
1200549
def do_help(self, args: argparse.Namespace) -> None:
        """"""
        if not args.command or args.verbose:
            self._help_menu(args.verbose)

        else:
            # Getting help for a specific command
            func = self.cmd_func(args.command)
            help_func = getattr(self, HELP_FUNC_PREFIX + args.command, None)

            # If the command function uses argparse, then use argparse's help
            if func and hasattr(func, 'argparser'):
                completer = AutoCompleter(getattr(func, 'argparser'), self)
                tokens = [args.command] + args.subcommand
                self.poutput(completer.format_help(tokens))

            # If there is no help information then print an error
            elif help_func is None and (func is None or not func.__doc__):
                err_msg = self.help_error.format(args.command)
                self.decolorized_write(sys.stderr, "{}\n".format(err_msg))

            # Otherwise delegate to cmd base class do_help()
            else:
                super().do_help(args.command)