Yield matching directory or file names. :param word: :return: iterable
(self, word: str)
| 1728 | return (Completion(x, -len(text_for_len)) for x in uniq_completions_str) |
| 1729 | |
| 1730 | def find_files(self, word: str) -> Generator[tuple[str, int], None, None]: |
| 1731 | """Yield matching directory or file names. |
| 1732 | |
| 1733 | :param word: |
| 1734 | :return: iterable |
| 1735 | |
| 1736 | """ |
| 1737 | # todo position is ignored, but may need to be used |
| 1738 | # todo fuzzy matches for filenames |
| 1739 | base_path, last_path, position = parse_path(word) |
| 1740 | paths = suggest_path(word) |
| 1741 | for name in paths: |
| 1742 | suggestion = complete_path(name, last_path) |
| 1743 | if suggestion: |
| 1744 | yield (suggestion, Fuzziness.PERFECT) |
| 1745 | |
| 1746 | def populate_scoped_cols(self, scoped_tbls: list[tuple[str | None, str, str | None]]) -> list[str]: |
| 1747 | """Find all columns in a set of scoped_tables |