from typing import List


def render_subcommand_completion(current_command: str, commands: List):
    """Renders case statement for subcommand completion."""
    return """
    ({current_command})
        coms="{commands}"
        COMPREPLY=($(compgen -W "${{coms}}" -- ${{cur}}))
        __ltrim_colon_completions "$cur"
        return 0;
        ;;
    """.format(
        current_command=current_command, commands=" ".join(commands)
    )