관리-도구
편집 파일: autocompletion.cpython-35.pyc
��Re� � @ s� d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z m Z d d l m Z d d l m Z e r� d d l m Z m Z m Z m Z d d � Z d d � Z d d � Z d S)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� d t j k r d St j d j � d d � } t t j d � } y | | d � Wn t k ro d � Yn Xt � } t t � } g } d } x! | D] } | | k r� | } Pq� W| d k r�| d k r� t j d � | d k o� � j d � } | r�g } � j � } xR t d d � D]A } | j j | � r| j | d d � k r| j | j � qW| r�x | D] } t | � qpWt j d � t | � } xW | j j D]I } | j t j k r�x. | j | j D] } | j | | j f � q�Wq�Wd d � | d | d � D� � � f d d � | D� } � f d d � | D� } t | | | j j � } | r�t � | � } d d � | D� } x$| D]H } | d } | d r�| d d d � d k r�| d 7} t | � q�Wn� d d � | j D� } | j | j � t j | � } � j d � r^xd | D], } | j t j k r+| | j | j 7} q+Wn- t | | | � } | r�t t � | � � } t d j � f d d � | D� � � t j d � d S)z?Entry Point for completion of main and subcommand options. �PIP_AUTO_COMPLETEN� COMP_WORDS� � COMP_CWORD� �help�show� uninstall�-� local_onlyTc S s# g | ] } | j d � d � q S)�=r )�split)�.0�x� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/cli/autocompletion.py� <listcomp>H s z autocomplete.<locals>.<listcomp>c s. g | ]$ \ } } | � k r | | f � q Sr r )r r �v)� prev_optsr r r I s c s1 g | ]'