Determine the context and last complete command or parameter from the complete args. Call that object's ``shell_complete`` method to get the completions for the incomplete value. :param args: List of complete args before the incomplete value. :param incomplete: Value
(
self, args: list[str], incomplete: str
)
| 290 | raise NotImplementedError |
| 291 | |
| 292 | def get_completions( |
| 293 | self, args: list[str], incomplete: str |
| 294 | ) -> list[CompletionItem[str]]: |
| 295 | """Determine the context and last complete command or parameter |
| 296 | from the complete args. Call that object's ``shell_complete`` |
| 297 | method to get the completions for the incomplete value. |
| 298 | |
| 299 | :param args: List of complete args before the incomplete value. |
| 300 | :param incomplete: Value being completed. May be empty. |
| 301 | """ |
| 302 | ctx = _resolve_context(self.cli, self.ctx_args, self.prog_name, args) |
| 303 | obj, incomplete = _resolve_incomplete(ctx, args, incomplete) |
| 304 | return obj.shell_complete(ctx, incomplete) |
| 305 | |
| 306 | def format_completion(self, item: CompletionItem[str]) -> str: |
| 307 | """Format a completion item into the form recognized by the |