def complete_xonfig(prefix, line, start, end, ctx):
 args = line.split(' ')
 if ((len(args) == 0) or (args[0] != 'xonfig')):
  return None
 curix = args.index(prefix)
 if (curix == 1):
  possible = {'info', 'wizard', 'styles', 'colors', '-h'}
 elif ((curix == 2) and (args[1] == 'colors')):
  possible = set(xt.color_style_names())
 else:
  raise StopIteration
 return {i for i in possible if i.startswith(prefix)}

def complete_xonfig ( prefix , line , start , end , ctx ) : args = line . split ( ' ' ) if ( ( len ( args ) == 0 ) or ( args [ 0 ] != 'xonfig' ) ) : return None curix = args . index ( prefix ) if ( curix == 1 ) : possible = { 'info' , 'wizard' , 'styles' , 'colors' , '-h' } elif ( ( curix == 2 ) and ( args [ 1 ] == 'colors' ) ) : possible = set ( xt . color_style_names ( ) ) else : raise StopIteration return { i for i in possible if i . startswith ( prefix ) }
completion for xonfig .