zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
U
H=®d     ã@sŒddlmZddlZddlZddlmZddlmZddlm    Z    ddl
m Z e rhddl m Z ddlmZd    Zd
d d d œZGdd„deƒZdS)é)Úabsolute_importN)ÚCommand)ÚSUCCESS)Úget_prog)ÚMYPY_CHECK_RUNNING)ÚList)ÚValueszD
# pip {shell} completion start{script}# pip {shell} completion end
a
        _pip_completion()
        {{
            COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \
                           COMP_CWORD=$COMP_CWORD \
                           PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
        }}
        complete -o default -F _pip_completion {prog}
    aM
        function _pip_completion {{
          local words cword
          read -Ac words
          read -cn cword
          reply=( $( COMP_WORDS="$words[*]" \
                     COMP_CWORD=$(( cword-1 )) \
                     PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null ))
        }}
        compctl -K _pip_completion {prog}
    au
        function __fish_complete_pip
            set -lx COMP_WORDS (commandline -o) ""
            set -lx COMP_CWORD ( \
                math (contains -i -- (commandline -t) $COMP_WORDS)-1 \
            )
            set -lx PIP_AUTO_COMPLETE 1
            string split \  -- (eval $COMP_WORDS[1])
        end
        complete -fa "(__fish_complete_pip)" -c {prog}
    )ÚbashÚzshÚfishc@s$eZdZdZdZdd„Zdd„ZdS)ÚCompletionCommandz3A helper command to be used for command completion.TcCs\|jjddddddd|jjdd    dd
dd d|jjd d ddddd|j d|j¡dS)Nz--bashz-bÚ store_constr    ÚshellzEmit completion code for bash)ÚactionÚconstÚdestÚhelpz--zshz-zr
zEmit completion code for zshz--fishz-fr zEmit completion code for fishr)Úcmd_optsÚ
add_optionÚparserÚinsert_option_group)Úself©rúXD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/commands/completion.pyÚ add_options;s2ûûûzCompletionCommand.add_optionscCszt ¡}dd„t|ƒDƒ}|j|krZt t |jd¡jtƒd¡}t    t
j||jdƒt St j  d d |¡¡¡t SdS)    z-Prints the completion code of the given shellcSsg|] }d|‘qS)z--r)Ú.0rrrrÚ
<listcomp>Vsz)CompletionCommand.run.<locals>.<listcomp>Ú)Úprog)ÚscriptrzERROR: You must pass {}
z or N)ÚCOMPLETION_SCRIPTSÚkeysÚsortedrÚtextwrapÚdedentÚgetÚformatrÚprintÚBASE_COMPLETIONrÚsysÚstderrÚwriteÚjoin)rÚoptionsÚargsZshellsZ shell_optionsrrrrÚrunRs
ÿÿÿzCompletionCommand.runN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Úignore_require_venvrr/rrrrr 6sr )Ú
__future__rr)r#Úpip._internal.cli.base_commandrÚpip._internal.cli.status_codesrÚpip._internal.utils.miscrÚpip._internal.utils.typingrÚtypingrÚoptparserr(r r rrrrÚ<module>s            ë#