def complete_xontrib(prefix, line, start, end, ctx):
 args = line.split(' ')
 if ((len(args) == 0) or (args[0] != 'xontrib')):
  return None
 curix = args.index(prefix)
 if (curix == 1):
  possible = {'list', 'load'}
 elif (curix == 2):
  if (args[1] == 'load'):
   possible = _list_installed_xontribs()
 else:
  raise StopIteration
 return {i for i in possible if i.startswith(prefix)}

def complete_xontrib ( prefix , line , start , end , ctx ) : args = line . split ( ' ' ) if ( ( len ( args ) == 0 ) or ( args [ 0 ] != 'xontrib' ) ) : return None curix = args . index ( prefix ) if ( curix == 1 ) : possible = { 'list' , 'load' } elif ( curix == 2 ) : if ( args [ 1 ] == 'load' ) : possible = _list_installed_xontribs ( ) else : raise StopIteration return { i for i in possible if i . startswith ( prefix ) }
completion for xontrib .