@@ -125,7 +125,6 @@ def panes(self) -> QueryList["Pane"]:  # type: ignore
125125        return  QueryList (panes )
126126
127127    # 
128-     # Command (pane-scoped) 
129128    # 
130129    def  cmd (self , cmd : str , * args : t .Any , ** kwargs : t .Any ) ->  tmux_cmd :
131130        """Return :meth:`Server.cmd` defaulting to ``target_window`` as target. 
@@ -136,12 +135,11 @@ def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
136135        ``args`` will override using the object's ``window_id`` as target. 
137136        """ 
138137        if  not  any (arg .startswith ("-t" ) for  arg  in  args ):
139-             args  =  ("-t" , self .window_id )  +   args 
138+             args  =  ("-t" , self .window_id ,  * args ) 
140139
141140        return  self .server .cmd (cmd , * args , ** kwargs )
142141
143142    # 
144-     # Commands (tmux-like) 
145143    # 
146144    def  select_pane (self , target_pane : t .Union [str , int ]) ->  t .Optional ["Pane" ]:
147145        """ 
@@ -219,21 +217,18 @@ def split_window(
219217        """ 
220218        tmux_formats  =  ["#{pane_id}"  +  FORMAT_SEPARATOR ]
221219
222-         # '-t%s' % self.attached_pane.get('pane_id'), 
223220        # 2013-10-18 LOOK AT THIS, rm'd it.. 
224-         tmux_args : t .Tuple [str , ...] =  tuple ()
221+         tmux_args : t .Tuple [str , ...] =  ()
225222
226223        if  target  is  not None :
227224            tmux_args  +=  ("-t%s"  %  target ,)
228225        else :
229226            if  len (self .panes ):
230227                tmux_args  +=  (
231-                     "-t%s:%s.%s" 
232-                     %  (self .session_id , self .window_id , self .panes [0 ].pane_index ),
228+                     f"-t{ self .session_id } { self .window_id } { self .panes [0 ].pane_index }  ,
233229                )
234230            else :
235-                 tmux_args  +=  ("-t%s:%s"  %  (self .session_id , self .window_id ),)
236-             # tmux_args += ("-t%s" % self.panes[0].pane_id,) 
231+                 tmux_args  +=  (f"-t{ self .session_id } { self .window_id }  ,)
237232
238233        if  vertical :
239234            tmux_args  +=  ("-v" ,)
@@ -313,7 +308,7 @@ def select_layout(self, layout: t.Optional[str] = None) -> "Window":
313308            'custom' 
314309                custom dimensions (see :term:`tmux(1)` manpages). 
315310        """ 
316-         cmd  =  ["select-layout" , "-t{}:{}"  . format ( self .session_id ,  self . window_index ) ]
311+         cmd  =  ["select-layout" , f "-t{ self . session_id } { self .window_index } " 
317312
318313        if  layout :  # tmux allows select-layout without args 
319314            cmd .append (layout )
@@ -349,7 +344,7 @@ def set_window_option(self, option: str, value: t.Union[int, str]) -> "Window":
349344
350345        cmd  =  self .cmd (
351346            "set-window-option" ,
352-             "-t{}:{}"  . format ( self .session_id ,  self . window_index ) ,
347+             f "-t{ self . session_id } { self .window_index } " 
353348            option ,
354349            value ,
355350        )
@@ -375,7 +370,7 @@ def show_window_options(self, g: t.Optional[bool] = False) -> "WindowOptionDict"
375370        g : str, optional 
376371            Pass ``-g`` flag for global variable, default False. 
377372        """ 
378-         tmux_args : t .Tuple [str , ...] =  tuple ()
373+         tmux_args : t .Tuple [str , ...] =  ()
379374
380375        if  g :
381376            tmux_args  +=  ("-g" ,)
@@ -419,7 +414,7 @@ def show_window_option(
419414        :exc:`exc.OptionError`, :exc:`exc.UnknownOption`, 
420415        :exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption` 
421416        """ 
422-         tmux_args : t .Tuple [t .Union [str , int ], ...] =  tuple ()
417+         tmux_args : t .Tuple [t .Union [str , int ], ...] =  ()
423418
424419        if  g :
425420            tmux_args  +=  ("-g" ,)
@@ -486,7 +481,7 @@ def kill_window(self) -> None:
486481
487482        proc  =  self .cmd (
488483            "kill-window" ,
489-             "-t{}:{}"  . format ( self .session_id ,  self . window_index ) ,
484+             f "-t{ self . session_id } { self .window_index } " 
490485        )
491486
492487        if  proc .stderr :
@@ -510,7 +505,7 @@ def move_window(
510505        session  =  session  or  self .session_id 
511506        proc  =  self .cmd (
512507            "move-window" ,
513-             "-s{}:{}"  . format ( self .session_id ,  self . window_index ) ,
508+             f "-s{ self . session_id } { self .window_index } " 
514509            f"-t{ session } { destination }  ,
515510        )
516511
0 commit comments