def complete_run(self, text, line, b, e):
        ''' Autocomplete file names with .forth ending. '''
        # Don't break on path separators.
        text = line.split()[-1]

        # Try to find files with a forth file ending, .fs.
        forth_files = glob.glob(text + '*.fs')

        # Failing that, just try and complete something.
        if len(forth_files) == 0:
            return [f.split(os.path.sep)[-1] for f in glob.glob(text + '*')]

        forth_files = [f.split(os.path.sep)[-1] for f in forth_files]
        return forth_files
def complete_run ( self , text , line , b , e ) : text = line . split ( ) [ - 1 ] forth_files = glob . glob ( text + '*.fs' ) if len ( forth_files ) == 0 : return [ f . split ( os . path . sep ) [ - 1 ] for f in glob . glob ( text + '*' ) ] forth_files = [ f . split ( os . path . sep ) [ - 1 ] for f in forth_files ] return forth_files
Autocomplete file names with .forth ending.