Skip to content

Commit

Permalink
docs(Pane): Tighten docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 6, 2024
1 parent 66a6e8e commit 5066910
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/libtmux/pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

@dataclasses.dataclass()
class Pane(Obj):
"""
A :term:`tmux(1)` :term:`Pane` [pane_manual]_.
""":term:`tmux(1)` :term:`Pane` [pane_manual]_.
``Pane`` instances can send commands directly to a pane, or traverse
between linked tmux objects.
Expand Down Expand Up @@ -124,8 +123,7 @@ def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
"""

def resize_pane(self, *args: t.Any, **kwargs: t.Any) -> "Pane":
"""
``$ tmux resize-pane`` of pane and return ``self``.
"""Resize tmux pane.
Parameters
----------
Expand Down Expand Up @@ -161,8 +159,7 @@ def capture_pane(
start: t.Union["t.Literal['-']", t.Optional[int]] = None,
end: t.Union["t.Literal['-']", t.Optional[int]] = None,
) -> t.Union[str, t.List[str]]:
"""
Capture text from pane.
"""Capture text from pane.
``$ tmux capture-pane`` to pane.
``$ tmux capture-pane -S -10`` to pane.
Expand Down Expand Up @@ -259,8 +256,7 @@ def display_message(self, cmd: str, get_text: "t.Literal[False]") -> None:
def display_message(
self, cmd: str, get_text: bool = False
) -> t.Optional[t.Union[str, t.List[str]]]:
"""
``$ tmux display-message`` to the pane.
"""Display message to pane.
Displays a message in target-client status line.
Expand All @@ -286,8 +282,7 @@ def display_message(
"""

def select_pane(self) -> "Pane":
"""
Select pane. Return ``self``.
"""Select pane.
To select a window object asynchrously. If a ``pane`` object exists
and is no longer longer the current window, ``w.select_pane()``
Expand All @@ -306,8 +301,7 @@ def split_window(
start_directory: t.Optional[str] = None,
percent: t.Optional[int] = None,
) -> "Pane": # New Pane, not self
"""
Split window at pane and return newly created :class:`Pane`.
"""Split window at pane and return newly created :class:`Pane`.
Parameters
----------
Expand All @@ -333,8 +327,7 @@ def split_window(
"""

def set_width(self, width: int) -> "Pane":
"""
Set width of pane.
"""Set pane width.
Parameters
----------
Expand All @@ -345,8 +338,7 @@ def set_width(self, width: int) -> "Pane":
return self

def set_height(self, height: int) -> "Pane":
"""
Set height of pane.
"""Set pane height.
Parameters
----------
Expand All @@ -357,8 +349,7 @@ def set_height(self, height: int) -> "Pane":
return self

def enter(self) -> "Pane":
"""
Send carriage return to pane.
"""Send carriage return to pane.
``$ tmux send-keys`` send Enter to the pane.
"""
Expand Down

0 comments on commit 5066910

Please sign in to comment.