'This method tries to find a plugin to parse the command sent
by the terminal (identiefied by the process id).'

def processCommandInput(self, pid, cmd, pwd):

    if (pid not in self.plugin_sets):
        self.createPluginSet(pid)
    plugin = self._get_plugins_by_input(cmd, self.plugin_sets[pid])
    if plugin:
        modified_cmd_string = plugin.processCommandString('', pwd, cmd)
        if (not self._is_command_malformed(cmd, modified_cmd_string)):
            cmd_info = CommandRunInformation(**{'workspace': model.api.getActiveWorkspace().name, 'itime': time.time(), 'command': cmd.split()[0], 'params': '    '.join(cmd.split()[1:])})
            self._mapper_manager.save(cmd_info)
            self._active_plugins[pid] = (plugin, cmd_info)
            return (plugin.id, modified_cmd_string)
    return (None, None)
