3

Q'íc•	ã@sDddlmZddlZddlmZdZddddœZGd	d
„d
eƒZdS)é)Úabsolute_importN)ÚCommandzJ
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
_pip_completion()
{
    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
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] ) )
}
compctl -K _pip_completion pip
a
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 pip
)ÚbashÚzshÚfishcs0eZdZdZdZdZ‡fdd„Zdd„Z‡ZS)ÚCompletionCommandz3A helper command to be used for command completion.Ú
completionz-A helper command used for command completion.csltt|ƒj||Ž|j}|jddddddd|jdd	dd
ddd|jdd
ddddd|jjd|ƒdS)Nz--bashz-bÚstore_constrÚshellzEmit completion code for bash)ÚactionÚconstÚdestÚhelpz--zshz-zrzEmit completion code for zshz--fishz-frzEmit completion code for fishr)ÚsuperrÚ__init__Úcmd_optsÚ
add_optionÚparserÚinsert_option_group)ÚselfÚargsÚkwr)Ú	__class__©ú6/tmp/pip-build-l_bcah40/pip/pip/commands/completion.pyr-s*zCompletionCommand.__init__cCsbtjƒ}dd„t|ƒDƒ}|j|krHtj|jdƒ}tt||jdœƒntjj	ddj
|ƒƒdS)z-Prints the completion code of the given shellcSsg|]}d|‘qS)z--r)Ú.0r
rrrú
<listcomp>Jsz)CompletionCommand.run.<locals>.<listcomp>Ú)Úscriptr
zERROR: You must pass %s
z or N)ÚCOMPLETION_SCRIPTSÚkeysÚsortedr
ÚgetÚprintÚBASE_COMPLETIONÚsysÚstderrÚwriteÚjoin)rÚoptionsrÚshellsÚ
shell_optionsrrrrÚrunGs
zCompletionCommand.run)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚsummaryrr,Ú
__classcell__rr)rrr(s
r)Ú
__future__rr%Úpip.basecommandrr$rrrrrrÚ<module>s