@@ -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 ):
@@ -558,6 +558,8 @@ def show_option(
558558 option : str ,
559559 g : bool = False ,
560560 option_type : t .Optional [OptionType ] = None ,
561+ include_hooks : t .Optional [bool ] = None ,
562+ include_parents : t .Optional [bool ] = None ,
561563 ) -> t .Optional [t .Union [str , int ]]:
562564 """Return option value for the target window.
563565
@@ -583,6 +585,12 @@ def show_option(
583585 assert option_type in OPTION_TYPE_FLAG_MAP
584586 tmux_args += (OPTION_TYPE_FLAG_MAP [option_type ],)
585587
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+
586594 tmux_args += (option ,)
587595
588596 cmd = self .cmd ("show-options" , * tmux_args )
0 commit comments