관리-도구
편집 파일: autocompletion.cpython-39.pyc
a ��Re� � @ s� d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z ddlmZ ddl mZmZ ddlmZ dd�d d �Ze e eee e e d�dd �Zeeee d�dd�ZdS )zBLogic that powers autocompletion installed by ``pip completion``. � N)�chain)�Any�Iterable�List�Optional)�create_main_parser)� commands_dict�create_command)�get_default_environment)�returnc s� dt jvrdS t jd �� dd� �tt jd �} z�| d � W n tyX d� Y n0 t� }tt�}g }d}�D ]}||v rt|} q�qt|du�r|dkr�t� d� � � d� o�|d v }|�rt� }� �� ���fd d�|j dd �D �}|�r|D ]} t| � q�t� d� t|�} | jjD ]8}|jtjk�r|j|j D ]}|�||jf� �q:�qdd� �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� t�|�}� � d��rf|D ]$}|jtjk�r>||j|j 7 }�q>n t�| |�} | �r�tt� | ��}td�� fdd�|D ��� t� d� dS )z:Entry Point for completion of main and subcommand options.�PIP_AUTO_COMPLETEN� COMP_WORDS� � COMP_CWORD� �help�-)�show� uninstallc s0 g | ](}|j ���r|j � d d� vr|j �qS )r N)�canonical_name� startswith)�.0�dist)�cwords�lc� ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/cli/autocompletion.py� <listcomp>2 s �z autocomplete.<locals>.<listcomp>T)� local_onlyc S s g | ]}|� d �d �qS )�=r )�split�r �xr r r r F � c s g | ]\}}|� vr||f�qS r r )r r"