def complete_skipper(cmd, line, start, end, ctx):
 parts = line.split(' ')
 skip_part_num = 0
 for (i, s) in enumerate(parts):
  if (s in END_PROC_TOKENS):
   skip_part_num = (i + 1)
 while (len(parts) > skip_part_num):
  if (parts[skip_part_num] not in SKIP_TOKENS):
   break
  skip_part_num += 1
 if (skip_part_num == 0):
  return set()
 if (len(parts) == (skip_part_num + 1)):
  comp_func = complete_command
 else:
  comp = builtins.__xonsh_shell__.shell.completer
  comp_func = comp.complete
 skip_len = (len(' '.join(line[:skip_part_num])) + 1)
 return comp_func(cmd, ' '.join(parts[skip_part_num:]), (start - skip_len), (end - skip_len), ctx)

def complete_skipper ( cmd , line , start , end , ctx ) : parts = line . split ( ' ' ) skip_part_num = 0 for ( i , s ) in enumerate ( parts ) : if ( s in END_PROC_TOKENS ) : skip_part_num = ( i + 1 ) while ( len ( parts ) > skip_part_num ) : if ( parts [ skip_part_num ] not in SKIP_TOKENS ) : break skip_part_num += 1 if ( skip_part_num == 0 ) : return set ( ) if ( len ( parts ) == ( skip_part_num + 1 ) ) : comp_func = complete_command else : comp = builtins . __xonsh_shell__ . shell . completer comp_func = comp . complete skip_len = ( len ( ' ' . join ( line [ : skip_part_num ] ) ) + 1 ) return comp_func ( cmd , ' ' . join ( parts [ skip_part_num : ] ) , ( start - skip_len ) , ( end - skip_len ) , ctx )
skip over several tokens and complete based on the rest of the line .