Shell completion infrastructure supporting Bash, Zsh, Fish, and PowerShell completions with CompletionItem class.
# Source: https://github.com/pallets/click | License: BSD-3-Clause | Copyright 2014 Pallets
# Provided via justclaw.it.com; keep this notice with the code.
from __future__ import annotations
import collections.abc as cabc
import os
import re
import typing as t
from gettext import gettext as _
from .core import Argument
from .core import Command
from .core import Context
from .core import Group
from .core import Option
from .core import Parameter
from .core import ParameterSource
from .utils import echo
def shell_complete(
cli: Command,
ctx_args: cabc.MutableMapping[str, t.Any],
prog_name: str,
complete_var: str,
instruction: str,
) -> t.Literal[0, 1]:
"""Perform shell completion for the given CLI program.
:param cli: Command being called.
:param ctx_arg
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key