관리-도구
편집 파일: autocompletion.cpython-38.pyc
U ʗ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 jkrdS t jd �� dd� �tt jd �} z�| d � W n tk rZ d� Y nX t� }tt�}g }d}�D ]}||krv|} q�qv|dk �rJ|dkr�t� d� � � d� o�|d k}|�rt� }� �� ���fd d�|j dd �D �}|�r|D ]} t| � q�t� d� � � d� �o"|dk} | �rNt� d�D ]}t|� �q4t� d� t|�}|jjD ]8} | jtjk�r^| j| j D ]}|�|| jf� �q|�q^dd� �d| d � D ���fdd�|D �}� fdd�|D �}t�| |jj�}|�rt� |�}dd� |D �}|D ]>}|d }|d �r<|d dd� dk�r<|d7 }t|� �qn�dd� |jD �}|�|j� t�|�}� � d��r�|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� kr|j �qS )r N)�canonical_name� startswith)�.0�dist)�cwords�lc� ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py� <listcomp>2 s �z autocomplete.<locals>.<listcomp>T)� local_only�install�pathc S s g | ]}|� d �d �qS )�=r )�split�r �xr r r r N s c s g | ]\}}|� kr||f�qS r r )r r$ �v)� prev_optsr r r O s c s"