Skip to content

prompter

prompter()

Command line prompter.

Returns:

Type Description
str

The string to be displayed in the prompt.

Source code in m/devcontainer/prompter.py
def prompter() -> str:
    """Command line prompter.

    Returns:
        The string to be displayed in the prompt.
    """
    branch_res = git.get_branch()
    if isinstance(branch_res, Bad):
        return COL(r'\[{orange}\]\w\[{end}\]$ ')
    return _git_prompter(branch_res.value)