관리-도구
편집 파일: autocompletion.cpython-36.pyc
3 �Re� � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z ddlmZ ddl mZ erxddlmZmZmZmZ d d � Zdd� Zd d� ZdS )zBLogic that powers autocompletion installed by ``pip completion``. � N)�chain)�create_main_parser)� commands_dict�create_command)�get_installed_distributions)�MYPY_CHECK_RUNNING)�Any�Iterable�List�Optionalc s� dt jkrdS t jd j� dd� } tt jd �}y| |d � W n tk rZ d� Y nX t� }tt�}g }d}x| D ]}||krx|}P qxW |dk �r>|dkr�tj d� |dko�� j d � }|�r6g }� j� } x<tdd�D ].} | j j | �r�| j | dd� kr�|j| j � q�W |�r6x|D ]} t| � �qW tj d� t|�}xH|jjD ]<}|jtjk�rHx&|j|j D ]} |j| |jf� �qhW �qHW d d� | d|d � D ���fdd�|D �}� fdd�|D �}t| ||jj�}|�r�t� |�}dd� |D �}x�|D ]>}|d }|d �r.|d dd� dk�r.|d7 }t|� �q�W n�dd� |jD �}|j|j� tj|�}� j d ��r�xN|D ]$}|jtjk�rv||j|j 7 }�qvW n t| ||�}|�r�tt� |��}tdj� fdd�|D ��� tj d� dS )z?Entry Point for completion of main and subcommand options. �PIP_AUTO_COMPLETEN� COMP_WORDS� � COMP_CWORD� �help�show� uninstall�-T)� local_onlyc S s g | ]}|j d �d �qS )�=r )�split)�.0�x� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py� <listcomp>H s z autocomplete.<locals>.<listcomp>c s g | ]\}}|� kr||f�qS r r )r r �v)� prev_optsr r r I s c s"