def _get_completions(cli, args, incomplete): comp = ShellComplete(cli, {}, cli.name, "_CLICK_COMPLETE") return comp.get_completions(args, incomplete)
def _get_completion(cmd, args, incomplete): complete = ShellComplete(cmd, {}, '', '') proposals = complete.get_completions(args, incomplete) return [c.value for c in proposals]