Source code for tbot.machine.linux.shell.bash

import typing
from tbot.machine.linux import shell


[docs]class Bash(shell.Shell): """ Bourne-Again SHell. .. py:data:: name: str = "bash" """ name = "bash" command = ["bash", "--norc"]
[docs] @staticmethod def set_prompt(prompt: str) -> str: # noqa: D102 return f"PROMPT_COMMAND=''\nPS1='{prompt}'"
[docs] @staticmethod def disable_editing() -> typing.Optional[str]: # noqa: D102 return "set +o emacs; set +o vi"
[docs] @staticmethod def enable_editing() -> typing.Optional[str]: # noqa: D102 return "set -o emacs"
[docs] @staticmethod def disable_history() -> typing.Optional[str]: # noqa: D102 return "unset HISTFILE"