From edc36ca90882744acea1d85e95c845d55820fa92 Mon Sep 17 00:00:00 2001 From: kees Date: Thu, 6 Jan 2022 11:30:14 +0100 Subject: [PATCH] add MultiExec.add(*Commands) --- reddish/_command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reddish/_command.py b/reddish/_command.py index 4ed54cf..f842b64 100644 --- a/reddish/_command.py +++ b/reddish/_command.py @@ -140,6 +140,9 @@ def __init__(self, *commands: Command) -> None: """ self._commands = commands + def add(self, *commands: Command): + self._commands += commands + def __repr__(self) -> str: commands = (repr(cmd) for cmd in self._commands) return f"{self.__class__.__name__}({', '.join(commands)})"