관리-도구
편집 파일: autocompletion.cpython-310.pyc
o ƚRe� � @ s� d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z ddlmZ ddl mZmZ ddlmZ dd d �Zde e ded ee de e fdd�Zdededee fdd�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 ty, d� Y nw t� }tt�}g }d}�D ] }||v rD|} nq:|dur�|dkrRt� d� � � d� o[|d v }|r�t� }� �� ���fd d�|j dd �D �}|r�|D ]} t| � qwt� d� t|�} | jjD ]}|jtjkr�|j|j D ] }|�||jf� q�q�dd� �d| d � D ���fdd�|D �}� fdd�|D �}t�| | jj�} | r�t� | �}dd� |D �}|D ]}|d }|d r�|d dd� dkr�|d7 }t|� q�nMdd� |jD �}|�|j� t�|�}� � d��r)|D ]}|jtjk�r&||j|j 7 }�qnt�| |�} | �r9tt� | ��}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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/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"