docs: def gen_filename_completions(self, word, filenames):
          """Generate a sequence of filenames that match ``word``.
  
          :param word: the word to complete
          """
          if not word:
              return filenames
          else:
              trie = pygtrie.CharTrie()
              for filename in filenames:
                  trie[filename] = filename
              return trie.iterkeys(prefix=word)