Skip to content

Commit 3c46c7a

Browse files
committed
feat(common): Add CmdMixin, CmdProtocol
1 parent 88c22fd commit 3c46c7a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/libtmux/common.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@
3131
PaneDict = dict[str, t.Any]
3232

3333

34+
class CmdProtocol(t.Protocol):
35+
"""Command protocol for tmux command."""
36+
37+
def __call__(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> "tmux_cmd":
38+
"""Wrap tmux_cmd."""
39+
...
40+
41+
42+
class CmdMixin:
43+
"""Command mixin for tmux command."""
44+
45+
cmd: CmdProtocol
46+
47+
3448
class EnvironmentMixin:
3549
"""Mixin for manager session and server level environment variables in tmux."""
3650

0 commit comments

Comments
 (0)