Skip to content

Commit e4a47c2

Browse files
committed
chore(Server.cmd): Accept cmd as first positional argument
1 parent 7547e9c commit e4a47c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libtmux/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def raise_if_dead(self) -> None:
173173
#
174174
# Command
175175
#
176-
def cmd(self, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
176+
def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
177177
"""Execute tmux command respective of socket name and file, return output.
178178
179179
Examples
@@ -216,7 +216,7 @@ def cmd(self, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
216216
217217
Renamed from ``.tmux`` to ``.cmd``.
218218
"""
219-
cmd_args: t.List[t.Union[str, int]] = list(args)
219+
cmd_args: t.List[t.Union[str, int]] = [cmd, *args]
220220
if self.socket_name:
221221
cmd_args.insert(0, f"-L{self.socket_name}")
222222
if self.socket_path:

0 commit comments

Comments
 (0)