
}«‘_Ö  ã               @   sP   d  d l  m Z d  d l m Z m Z d  d l m Z Gd d „  d e ƒ Z d S)é    )Úabsolute_import)ÚCommandÚSUCCESS)ÚCommandErrorc               @   s4   e  Z d  Z d Z d Z d Z d Z d d „  Z d S)ÚHelpCommandzShow help for commandsÚhelpz
      %prog <command>zShow help for commands.c       	      C   s¬   d d l  m } m } y | d } Wn t k
 r< t SYn X| | k rŽ | | ƒ } d | g } | ry | j d | ƒ t d j | ƒ ƒ ‚ | | ƒ  } | j j	 ƒ  t S)Nr   )Úcommands_dictÚget_similar_commandszunknown command "%s"zmaybe you meant "%s"z - )
Úpip.commandsr   r	   Ú
IndexErrorr   Úappendr   ÚjoinÚparserÚ
print_help)	ÚselfÚoptionsÚargsr   r	   Úcmd_nameÚguessÚmsgÚcommand© r   ú0/tmp/pip-build-3_sjtvrs/pip/pip/commands/help.pyÚrun   s    	zHelpCommand.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚusageÚsummaryr   r   r   r   r   r      s
   r   N)Ú
__future__r   Úpip.basecommandr   r   Úpip.exceptionsr   r   r   r   r   r   Ú<module>   s   