Skip to content

Commit 1cb86f9

Browse files
committed
feat(common): Add CmdMixin, CmdProtocol
1 parent c5318c6 commit 1cb86f9

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
@@ -35,6 +35,20 @@
3535
PaneDict = dict[str, t.Any]
3636

3737

38+
class CmdProtocol(t.Protocol):
39+
"""Command protocol for tmux command."""
40+
41+
def __call__(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
42+
"""Wrap tmux_cmd."""
43+
...
44+
45+
46+
class CmdMixin:
47+
"""Command mixin for tmux command."""
48+
49+
cmd: CmdProtocol
50+
51+
3852
class EnvironmentMixin:
3953
"""Mixin for manager session and server level environment variables in tmux."""
4054

0 commit comments

Comments
 (0)