U
    KQhÖ  ã                   @   s<   d dl mZ d dlmZmZ d dlmZ G dd„ deƒZdS )é    )Úabsolute_import)ÚCommandÚSUCCESS)ÚCommandErrorc                   @   s$   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} z|d }W n tk
r4   t Y S X ||krp||ƒ}d| g}|rb| d| ¡ td |¡ƒ‚|| ƒ }|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-tlro1kwj/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   