#NEWLINE# @ cli . command ( 'help' ) #NEWLINE# @ click . argument ( 'command' , default = '' ) #NEWLINE# @ click . pass_context #NEWLINE# def help( context , command ) : #NEWLINE# #INDENT# 'Get command help' #NEWLINE# if command : #NEWLINE# #INDENT# cmd = cli . commands . get ( command , None ) #NEWLINE# if context : #NEWLINE# #INDENT# context . info_name = command #NEWLINE# click . echo ( cmd . get_help ( context ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise click . ClickException ( ( 'no command: %s' % command ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# click . echo ( cli . get_help ( context ) )