def apt_completer(self, event):
    """ Completer for apt-get (uses apt-cache internally)

    """


    cmd_param = event.line.split()
    if event.line.endswith(' '):
        cmd_param.append('')

    if cmd_param[0] == 'sudo':
        cmd_param = cmd_param[1:]

    if len(cmd_param) == 2 or 'help' in cmd_param:
        return apt_commands.split()

    return list(apt_get_packages(event.symbol))
dataset/ETHPy150Open ipython/ipython-py3k/IPython/quarantine/ipy_completers.py/apt_completer/original