File tree Expand file tree Collapse file tree 1 file changed +50
-2
lines changed Expand file tree Collapse file tree 1 file changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -533,16 +533,25 @@ def attached_pane(self) -> t.Optional["Pane"]:
533
533
# Redundant stuff we want to remove
534
534
#
535
535
def _list_panes (self ) -> t .List [PaneDict ]:
536
+ """
537
+ .. deprecated:: 0.16
538
+ """
536
539
return [pane .__dict__ for pane in self .panes ]
537
540
538
541
@property
539
542
def _panes (self ) -> t .List [PaneDict ]:
540
- """Property / alias to return :meth:`~._list_panes`."""
543
+ """Property / alias to return :meth:`~._list_panes`.
544
+
545
+ .. deprecated:: 0.16
546
+ """
541
547
542
548
return self ._list_panes ()
543
549
544
550
def list_panes (self ) -> t .List ["Pane" ]:
545
- """Return list of :class:`Pane` for the window."""
551
+ """Return list of :class:`Pane` for the window.
552
+
553
+ .. deprecated:: 0.16
554
+ """
546
555
547
556
return self .panes
548
557
@@ -565,3 +574,42 @@ def __repr__(self) -> str:
565
574
self .window_name ,
566
575
self .session ,
567
576
)
577
+
578
+ #
579
+ # Aliases
580
+ #
581
+ @property
582
+ def id (self ) -> str | None :
583
+ """Alias of :attr:`Window.window_id`
584
+
585
+ >>> window.id
586
+ '@1'
587
+
588
+ >>> window.id == window.window_id
589
+ True
590
+ """
591
+ return self .window_id
592
+
593
+ @property
594
+ def name (self ) -> str | None :
595
+ """Alias of :attr:`Window.window_name`
596
+
597
+ >>> window.name
598
+ 'tmux'
599
+
600
+ >>> window.name == window.window_name
601
+ True
602
+ """
603
+ return self .window_name
604
+
605
+ @property
606
+ def index (self ) -> str | None :
607
+ """Alias of :attr:`Window.window_index`
608
+
609
+ >>> window.index
610
+ '1'
611
+
612
+ >>> window.index == window.window_index
613
+ True
614
+ """
615
+ return self .window_index
You can’t perform that action at this time.
0 commit comments