sjؖ d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZmZ dd lmZ ddZddZddZdS )zALogic that powers autocompletion installed by ``pip completion``. )annotationsN)Iterable)chain)Any)create_main_parser)
commands_dictcreate_command)get_default_environmentreturnNonec dt j vrdS t j d rt j d sdS t j d dd t t j d } | dz
n# t
$ r dY nw xY wt
}t t }g }d}D ]
}||v r|} n|\|dk rt j
d d o|d v }|rot }
fd
| d D }|r(|D ]} t | t j
d d o|d
k }
|
r6t! d D ]}t | t j
d t# | }|j j D ]5j t* j k r|fdj j z D z
}6d d| dz
D fd|D }fd|D }t3 | |j j }
|
rt! |
}d |D }|D ]:}|d }|d r|d dd dk r|dz
}t | ;t5 fd| D s;| D ]&}| rt | 'nd |j D }| |j t? j | } d r-|D ])j t* j k r|j j z z
}*n0t3 | | }
|
rt t! |
}t d! fd|D t j
d dS )z:Entry Point for completion of main and subcommand options.PIP_AUTO_COMPLETEN
COMP_WORDS
COMP_CWORD help-)show uninstallc t g | ]4}|j r|j d d v-|j 5S )r N)canonical_name
startswith).0distcwordslcs r/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py