관리-도구
편집 파일: autocompletion.cpython-38.pyc
U ��.e � @ s` d Z ddlZddlZddlZddlmZ ddlmZmZ ddl m Z dd� Zdd � Zd d� Z dS )zBLogic that powers autocompletion installed by ``pip completion``. � N)�create_main_parser)� commands_dict�create_command)�get_installed_distributionsc s� dt jkrdS t jd �� dd� } tt jd �}z| |d � W n tk rZ d� Y nX tt��g }z�fdd�| D �d }W n tk r� d}Y nX t� }|�r:|d kr�t� d� |dkö � d� }|�r>g }� �� }td d�D ].}|j � |�r�|j | dd� kr�|�|j � q�|�r>|D ]}t|� �q$t� d� t|�} | jjD ]8} | jtjk�rN| j| j D ]}|�|| jf� �ql�qNdd� | d|d � D ���fdd�|D �}� fdd�|D �}t| || jj�}|�r�t� |�}dd� |D �}|D ]>} | d }| d �r,| d dd� dk�r,|d7 }t|� �q�n�dd� |jD �}|�|j� dd� |D �}� � d��r�|D ]$} | jtjk�rt�| j| j 7 ��qtnt| ||�}|�r�t� |��td�� fdd��D ��� t� d� dS )z?Entry Point for completion of main and subcommand options. ZPIP_AUTO_COMPLETENZ COMP_WORDS� Z COMP_CWORD� c s g | ]}|� kr|�qS � r )�.0�w)�subcommandsr �D/usr/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py� <listcomp>! s z autocomplete.<locals>.<listcomp>r �help)ZshowZ uninstall�-T)Z local_onlyc S s g | ]}|� d �d �qS )�=r )�split�r �xr r r r D s c s g | ]\}}|� kr||f�qS r r )r r �v)� prev_optsr r r E s c s"