(
self, cursor_offset: int, line: str, **kwargs: Any
)
| 351 | super().__init__(False, mode) |
| 352 | |
| 353 | def matches( |
| 354 | self, cursor_offset: int, line: str, **kwargs: Any |
| 355 | ) -> set[str] | None: |
| 356 | cs = lineparts.current_string(cursor_offset, line) |
| 357 | if cs is None: |
| 358 | return None |
| 359 | matches = set() |
| 360 | username = cs.word.split(os.path.sep, 1)[0] |
| 361 | user_dir = os.path.expanduser(username) |
| 362 | for filename in _safe_glob(os.path.expanduser(cs.word)): |
| 363 | if os.path.isdir(filename): |
| 364 | filename += os.path.sep |
| 365 | if cs.word.startswith("~"): |
| 366 | filename = username + filename[len(user_dir) :] |
| 367 | matches.add(filename) |
| 368 | return matches |
| 369 | |
| 370 | def locate(self, cursor_offset: int, line: str) -> LinePart | None: |
| 371 | return lineparts.current_string(cursor_offset, line) |
nothing calls this directly
no test coverage detected