.. _dootle.actions.shell: ==================== dootle.actions.shell ==================== .. py:module:: dootle.actions.shell Classes ------- .. autoapisummary:: dootle.actions.shell.ShellBake dootle.actions.shell.ShellBakedRun dootle.actions.shell.ShellAction dootle.actions.shell.ShellInteractive Module Contents =============== .. _dootle.actions.shell.ShellBake: .. py:class:: ShellBake Create a pre-baked shell chain for reuse as in a ShellBakedRun, args are explicit eg:: {do='bake!', args=[...], update_="baked"}, {do="bake!', args=[...], in_="baked", update_="baked"}, {do="run!", in_="baked", update_="result"} .. _dootle.actions.shell.ShellBakedRun: .. py:class:: ShellBakedRun Run a series of baked commands .. _dootle.actions.shell.ShellAction: .. py:class:: ShellAction For actions in subshells/processes. all other arguments are passed directly to the program, using `sh` :: - `env_` : an indirect key for using a pre-baked sh environment - `exitcodes` : list[int] for what is acceptable return values - `splitlines` : bool for splitting the stdout result - `errlimit` : int for how much of the tail of the stderr is printed ([x:]) .. py:method:: _print_err(err, limit: int) .. _dootle.actions.shell.ShellInteractive: .. py:class:: ShellInteractive An interactive command, which uses the self.interact method as a callback for sh. see: https://sh.readthedocs.io/en/latest/sections/asynchronous_execution.html#interactive-callbacks .. py:attribute:: aggregated :value: '' .. py:attribute:: prompt :value: '>>> ' .. py:attribute:: cont :value: '... ' .. py:method:: interact(char, stdin) -> None