Your IP : 18.117.91.116
�
�Re. � @ sP d d l Z d d l m Z d Z i d d 6d d 6Z Gd d � d e � Z d S)
� N)�CommandzJ
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
z�
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
�bashz�
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
�zshc sF e Z d Z d Z d Z d Z d Z � f d d � Z d d � Z � S) �CompletionCommandz3A helper command to be used for command completion.�
completionz2A helper command to be used for command completionTc ss t t | � j | | � | j j d d d d d d d d d d
�| j j d d d d d d
d d d d �d S)Nz--bashz-b�action�store_const�constr �dest�shell�helpzEmit completion code for bashz--zshz-zr zEmit completion code for zsh)�superr �__init__�parser�
add_option)�self�args�kw)� __class__� �2/tmp/pip-ztkk0jow-build/pip/commands/completion.pyr $ s zCompletionCommand.__init__c C s� t j � } d d � t | � D� } | j | k rk t j | j d � } t t i | d 6| j d 6� n t j j d d j
| � � d S) z-Prints the completion code of the given shellc S s g | ] } d | � q S)z--r )�.0r r r r �
<listcomp>6 s z)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_optionsr r r r �run3 s "zCompletionCommand.run) �__name__�
__module__�__qualname__�__doc__�name�summary�hiddenr r( r r )r r r s r )r! �pip.basecommandr r r r r r r r �<module> s