#NEWLINE# @ cli . init #NEWLINE# def main( args ) : #NEWLINE# #INDENT# cmdline = ( os . environ . get ( 'COMP_LINE' ) or os . environ . get ( 'COMMAND_LINE' ) or '' ) #NEWLINE# cmdpoint = int ( ( os . environ . get ( 'COMP_POINT' ) or len ( args ) ) ) #NEWLINE# words = cmdline [ : cmdpoint ] . split ( ) #NEWLINE# if ( len ( words ) == 0 ) : #NEWLINE# #INDENT# return usage ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( words ) == 1 ) : #NEWLINE# #INDENT# return complete_cmd ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( words ) == 2 ) : #NEWLINE# #INDENT# if ( cmdline [ ( - 1 ) ] == ' ' ) : #NEWLINE# #INDENT# return cmd_options ( words [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return complete_cmd ( words [ 1 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return cmd_options ( words [ 1 ] )