openhands.runtime.utils.bash
escape_bash_special_chars
def escape_bash_special_chars(command: str) -> str
Escapes characters that have different interpretations in bash vs python. Specifically handles escape sequences like ;, |, &, etc.
BashSession Objects
class BashSession()
__del__
def __del__()
Ensure the session is closed when the object is destroyed.
close
def close()
Clean up the session.
execute
def execute(action: CmdRunAction) -> CmdOutputObservation | ErrorObservation
Execute a command in the bash session.