Add a command to this command file.

        Args:
            command (str): The command to add
            *args (str): The parameters to call the command with
487648
def add(self, command, *args):
        

        cmd = Command(command, args)
        self.commands.append(cmd)
315965
def update(self, command=None, **kwargs):
        
        if command is None:
            argparser = self.argparser
        else:
            argparser = self[command]

        for k,v in kwargs.items():
            setattr(argparser, k, v)
35314
def add_command_formatting(self, command):
        

        if command.description:
            self.paginator.add_line(command.description, empty=True)

        signature = self.get_command_signature(command)
        if command.aliases:
            self.paginator.add_line(signature)
            self.add_aliases_formatting(command.aliases)
        else:
            self.paginator.add_line(signature, empty=True)

        if command.help:
            try:
                self.paginator.add_line(command.help, empty=True)
            except RuntimeError:
                for line in command.help.splitlines():
                    self.paginator.add_line(line)
                self.paginator.add_line()
1325798
def command(self, *args, **kwargs):
        
        def decorator(f):
            cmd = command(*args, **kwargs)(f)
            self.add_command(cmd)
            return cmd
        return decorator
965268
def add_argument(self, *args, **kwargs):
        
        defhelp = kwargs.pop("help", None)
        defaults = kwargs.pop("default", None)
        default = defaults if self.use_defaults else None
        if not defhelp or default is None or kwargs.get('action') == 'help':
            return super().add_argument(*args, help=defhelp, default=default, **kwargs)
        else:
            return super().add_argument(*args, help=defhelp + " (default: {})".format(default),
                                        default=default, **kwargs)
336608
def add_command(self, command):
        
        try:
            self._history.remove(command)
        except ValueError:
            pass
        self._history.insert(0, command)
        self._index = -1
795272
def add_file_arg(self, filename):
    
    self.__arguments.append(filename)
    if filename not in self.__input_files:
      self.__input_files.append(filename)
752453
def def_cmd(name=None, short=None, fn=None, usage=None, help=None):
    
    command = Command(name=name, short=short, fn=fn, usage=usage, help=help)
    Command.register(command)
461246
def call_command_handler(command, pymux, arguments):
    
    assert isinstance(arguments, list)

    # Resolve aliases.
    command = ALIASES.get(command, command)

    try:
        handler = COMMANDS_TO_HANDLERS[command]
    except KeyError:
        pymux.show_message('Invalid command: %s' % (command,))
    else:
        try:
            handler(pymux, arguments)
        except CommandException as e:
            pymux.show_message(e.message)
421864
def AddArg(self, argument):
    
    self.args.append(argument)
    if len(self.args) > self.number_of_args:
      raise errors.ParseError('Too many arguments for this expression.')

    elif len(self.args) == self.number_of_args:
      return True

    return False
1223392
def _add(self, name, *args, **kwargs):
        ''''''

        self.commands.append(Command(name, args, kwargs))
756277
def handle_command(command):
  
  try:
    cmds = command.split(None, 1)
    cmd = cmds[0]
    if cmd == 'new':
      add_task(get_arg(cmds))
    elif cmd == 'done':
      mark_done(int(get_arg(cmds)))
    elif cmd == 'list':
      for task in format_tasks(list_tasks()):
        print task
    elif cmd == 'delete':
      delete_task(int(get_arg(cmds)))
    else:
      print_usage()
  except Exception, e:  # pylint: disable=broad-except
    print e
    print_usage()
1138306
def add_process(self, command=None, vsplit=False, start_directory=None):
        
        assert command is None or isinstance(command, six.text_type)
        assert start_directory is None or isinstance(start_directory, six.text_type)

        window = self.arrangement.get_active_window()

        pane = self._create_pane(window, command, start_directory=start_directory)
        window.add_pane(pane, vsplit=vsplit)
        pane.focus()
        self.invalidate()
1254703
def send_command(self, command, arg=None):
    
    if arg is not None:
      command = '%s:%s' % (command, arg)
    self._write(six.StringIO(command), len(command))
1328281
def _cmd(self, command, data=None, params=None, api_version=1):
    
    return self._post("commands/" + command, ApiCommand,
        data=data, params=params, api_version=api_version)
2060
def command_repo_add(self):
        
        if len(self.args) == 3 and self.args[0] == "repo-add":
            Repo().add(self.args[1], self.args[2])
        else:
            usage("")
645675
def _add_cli_param(params, key, value):
    '''
    
    '''
    if value is not None:
        params.append('--{0}={1}'.format(key, value))