ôY• ã@sdddlmZddlZddlmZdZddddd d iZGd d „d eƒZdS) é)Úabsolute_importN)ÚCommandzJ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end ÚbashzÏ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ PIP_AUTO_COMPLETE=1 $1 ) ) } complete -o default -F _pip_completion pip Úzshzñ 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 Úfisha 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 cs@eZdZdZdZdZ‡fdd†Zdd„Z‡S)ÚCompletionCommandz3A helper command to be used for command completion.Ú completionz-A helper command used for command completion.c s±tt|ƒj||Ž|j}|jddddddddd d ƒ|jd d dddd ddd dƒ|jddddddddd dƒ|jjd|ƒdS)Nz--bashz-bÚactionÚ store_constÚconstrÚdestÚshellÚhelpzEmit completion code for bashz--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-3puug3g5/pip/pip/commands/completion.pyr-s*    zCompletionCommand.__init__cCsŠtjƒ}dd„t|ƒDƒ}|j|kritj|jdƒ}ttd|d|jiƒntjj ddj |ƒƒdS) z-Prints the completion code of the given shellcSsg|]}d|‘qS)z--r)Ú.0r rrrú Js z)CompletionCommand.run..ÚÚ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,rr)rrr(s r)Ú __future__rr%Úpip.basecommandrr$rrrrrrÚs