You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/lib/ansible_test/_internal/cli/epilog.py

24 lines
658 B
Python

"""Argument parsing epilog generation."""
from __future__ import annotations
from .argparsing import (
CompositeActionCompletionFinder,
)
from ..data import (
data_context,
)
def get_epilog(completer: CompositeActionCompletionFinder) -> str:
"""Generate and return the epilog to use for help output."""
if completer.enabled:
epilog = 'Tab completion available using the "argcomplete" python package.'
else:
epilog = 'Install the "argcomplete" python package to enable tab completion.'
if data_context().content.unsupported:
epilog += '\n\n' + data_context().explain_working_directory()
return epilog