@@ -355,7 +355,7 @@ def set_option(
355
355
suppress_warnings : t .Optional [bool ] = None ,
356
356
append : t .Optional [bool ] = None ,
357
357
g : t .Optional [bool ] = None ,
358
- option_type : t .Optional [OptionType ] = None ,
358
+ option_type : t .Optional [OptionType ] = OptionType . Window ,
359
359
) -> "Window" :
360
360
"""Set option for tmux window.
361
361
@@ -417,9 +417,9 @@ def set_option(
417
417
cmd = self .cmd (
418
418
"set-option" ,
419
419
f"-t{ self .session_id } :{ self .window_index } " ,
420
+ * flags ,
420
421
option ,
421
422
value ,
422
- * flags ,
423
423
)
424
424
425
425
if isinstance (cmd .stderr , list ) and len (cmd .stderr ):
@@ -558,6 +558,8 @@ def show_option(
558
558
option : str ,
559
559
g : bool = False ,
560
560
option_type : t .Optional [OptionType ] = None ,
561
+ include_hooks : t .Optional [bool ] = None ,
562
+ include_parents : t .Optional [bool ] = None ,
561
563
) -> t .Optional [t .Union [str , int ]]:
562
564
"""Return option value for the target window.
563
565
@@ -583,6 +585,12 @@ def show_option(
583
585
assert option_type in OPTION_TYPE_FLAG_MAP
584
586
tmux_args += (OPTION_TYPE_FLAG_MAP [option_type ],)
585
587
588
+ if include_parents is not None and include_parents :
589
+ tmux_args += ("-A" ,)
590
+
591
+ if include_hooks is not None and include_hooks :
592
+ tmux_args += ("-H" ,)
593
+
586
594
tmux_args += (option ,)
587
595
588
596
cmd = self .cmd ("show-options" , * tmux_args )
0 commit comments