Skip to content

Commit c14deeb

Browse files
committed
!squash window more
1 parent fa02976 commit c14deeb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/libtmux/window.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def set_option(
355355
suppress_warnings: t.Optional[bool] = None,
356356
append: t.Optional[bool] = None,
357357
g: t.Optional[bool] = None,
358-
option_type: t.Optional[OptionType] = None,
358+
option_type: t.Optional[OptionType] = OptionType.Window,
359359
) -> "Window":
360360
"""Set option for tmux window.
361361
@@ -417,9 +417,9 @@ def set_option(
417417
cmd = self.cmd(
418418
"set-option",
419419
f"-t{self.session_id}:{self.window_index}",
420+
*flags,
420421
option,
421422
value,
422-
*flags,
423423
)
424424

425425
if isinstance(cmd.stderr, list) and len(cmd.stderr):
@@ -551,6 +551,8 @@ def show_option(
551551
option: str,
552552
g: bool = False,
553553
option_type: t.Optional[OptionType] = None,
554+
include_hooks: t.Optional[bool] = None,
555+
include_parents: t.Optional[bool] = None,
554556
) -> t.Optional[t.Union[str, int]]:
555557
"""Return option value for the target window.
556558
@@ -576,6 +578,12 @@ def show_option(
576578
assert option_type in OPTION_TYPE_FLAG_MAP
577579
tmux_args += (OPTION_TYPE_FLAG_MAP[option_type],)
578580

581+
if include_parents is not None and include_parents:
582+
tmux_args += ("-A",)
583+
584+
if include_hooks is not None and include_hooks:
585+
tmux_args += ("-H",)
586+
579587
tmux_args += (option,)
580588

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

0 commit comments

Comments
 (0)