Skip to content

Commit

Permalink
!squash window more
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 6, 2024
1 parent 2fdf6e8 commit 939ca24
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/libtmux/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def set_option(
suppress_warnings: t.Optional[bool] = None,
append: t.Optional[bool] = None,
g: t.Optional[bool] = None,
option_type: t.Optional[OptionType] = None,
option_type: t.Optional[OptionType] = OptionType.Window,
) -> "Window":
"""Set option for tmux window.
Expand Down Expand Up @@ -417,9 +417,9 @@ def set_option(
cmd = self.cmd(
"set-option",
f"-t{self.session_id}:{self.window_index}",
*flags,
option,
value,
*flags,
)

if isinstance(cmd.stderr, list) and len(cmd.stderr):
Expand Down Expand Up @@ -558,6 +558,8 @@ def show_option(
option: str,
g: bool = False,
option_type: t.Optional[OptionType] = None,
include_hooks: t.Optional[bool] = None,
include_parents: t.Optional[bool] = None,
) -> t.Optional[t.Union[str, int]]:
"""Return option value for the target window.
Expand All @@ -583,6 +585,12 @@ def show_option(
assert option_type in OPTION_TYPE_FLAG_MAP
tmux_args += (OPTION_TYPE_FLAG_MAP[option_type],)

if include_parents is not None and include_parents:
tmux_args += ("-A",)

if include_hooks is not None and include_hooks:
tmux_args += ("-H",)

tmux_args += (option,)

cmd = self.cmd("show-options", *tmux_args)
Expand Down

0 comments on commit 939ca24

Please sign in to comment.