parameters: (self, command)
docstring: Add a command to the command history.
  
      Args:
        command: The history command, as a str.
  
      Raises:
        TypeError: if command is not a str.
docstring_summary: Add a command to the command history.
docstring_tokens: Add a command to the command history .
function: def add_command(self, command):
      """Add a command to the command history.
  
      Args:
        command: The history command, as a str.
  
      Raises:
        TypeError: if command is not a str.
      """
  
      if self._commands and command == self._commands[-1]:
        # Ignore repeating commands in a row.
        return
  
      if not isinstance(command, six.string_types):
        raise TypeError("Attempt to enter non-str entry to command history")
  
      self._commands.append(command)
  
      if len(self._commands) > self._limit:
        self._commands = self._commands[-self._limit:]
  
      self._add_command_to_history_file(command)
function_tokens: def add_command ( self , command ) : if self . _commands and command == self . _commands [ - 1 ] : # Ignore repeating commands in a row. return if not isinstance ( command , six . string_types ) : raise TypeError ( "Attempt to enter non-str entry to command history" ) self . _commands . append ( command ) if len ( self . _commands ) > self . _limit : self . _commands = self . _commands [ - self . _limit : ] self . _add_command_to_history_file ( command )