2323
2424class Window (util .TmuxMappingObject , util .TmuxRelationalObject ):
2525
26- '''
27- ``tmux(1) window``.
28- '''
26+ """:ref:`tmux(1)` window."""
2927
3028 childIdAttribute = 'pane_id'
3129
@@ -42,14 +40,12 @@ def __init__(self, session=None, **kwargs):
4240
4341 self ._window_id = kwargs ['window_id' ]
4442
45- #self.server._update_windows()
46-
4743 def __repr__ (self ):
4844 return "%s(%s %s:%s, %s)" % (
4945 self .__class__ .__name__ ,
5046 self .get ('window_id' ),
5147 self .get ('window_index' ),
52- self .get ('window_name' ), # @todo, bug when window name blank
48+ self .get ('window_name' ),
5349 self .session
5450 )
5551
@@ -73,11 +69,15 @@ def by(val, *args):
7369 return list (filter (by , self .server ._windows ))[0 ]
7470
7571 def tmux (self , cmd , * args , ** kwargs ):
76- """Send command to tmux with :attr:`window_id` as ``target-window``.
72+ """Return :meth:`Server.tmux` defaulting ``target_window`` as target.
73+
74+ Send command to tmux with :attr:`window_id` as ``target-window``.
7775
7876 Specifying ``('-t', 'custom-target')`` or ``('-tcustom_target')`` in
7977 ``args`` will override using the object's ``window_id`` as target.
8078
79+ :rtype: :class:`Server.tmux`
80+
8181 """
8282 if not len ([arg for arg in args if '-t' in str (arg )]):
8383 args = ('-t' , self .get ('window_id' )) + args
0 commit comments