# Path: src/click/_compat.py
# def term_len(x: str) -> int:
#     return len(strip_ansi(x))
# 
# Path: src/click/parser.py
# def split_opt(opt: str) -> t.Tuple[str, str]:
#     first = opt[:1]
#     if first.isalnum():
#         return "", opt
#     if opt[1:2] == first:
#         return opt[:2], opt[2:]
#     return first, opt[1:]


import typing as t
        import shutil
from contextlib import contextmanager
from gettext import gettext as _
from ._compat import term_len
from .parser import split_opt
    from ._textwrap import TextWrapper
        self.indent()
        try:
            yield
        finally:
            self.dedent()

    @contextmanager
    def indentation(self) -> t.Iterator[None]:
        """A context manager that increases the indentation."""
        self.indent()
        try:
            yield
        finally:
            self.dedent()

    def getvalue(self) -> str:
        """Returns the buffer contents."""
        return "".join(self.buffer)


def join_options(options: t.Sequence[str]) -> t.Tuple[str, bool]:
    """Given a list of option strings this joins them in the most appropriate
    way and returns them in the form ``(formatted_string,
    any_prefix_is_slash)`` where the second item in the tuple is a flag that
    indicates if any of the option prefixes was a slash.
    """
    rv = []
    any_prefix_is_slash = False

    for opt in options:

# Path: src/click/_compat.py
# def term_len(x: str) -> int:
#     return len(strip_ansi(x))
# 
# Path: src/click/parser.py
# def split_opt(opt: str) -> t.Tuple[str, str]:
#     first = opt[:1]
#     if first.isalnum():
#         return "", opt
#     if opt[1:2] == first:
#         return opt[:2], opt[2:]
#     return first, opt[1:]


# Path: src/click/formatting.py
import typing as t
        import shutil
from contextlib import contextmanager
from gettext import gettext as _
from ._compat import term_len
from .parser import split_opt
    from ._textwrap import TextWrapper

        self.indent()
        try:
            yield
        finally:
            self.dedent()

    @contextmanager
    def indentation(self) -> t.Iterator[None]:
        """A context manager that increases the indentation."""
        self.indent()
        try:
            yield
        finally:
            self.dedent()

    def getvalue(self) -> str:
        """Returns the buffer contents."""
        return "".join(self.buffer)


def join_options(options: t.Sequence[str]) -> t.Tuple[str, bool]:
    """Given a list of option strings this joins them in the most appropriate
    way and returns them in the form ``(formatted_string,
    any_prefix_is_slash)`` where the second item in the tuple is a flag that
    indicates if any of the option prefixes was a slash.
    """
    rv = []
    any_prefix_is_slash = False

    for opt in options:

        prefix = split_opt(opt)[0]