@@ -441,11 +441,47 @@ def show_window_options(self, g: t.Optional[bool] = False) -> "WindowOptionDict"
441
441
option_type = OptionType .Window ,
442
442
)
443
443
444
+ @t .overload
444
445
def show_options (
445
446
self ,
446
- g : t .Optional [bool ] = False ,
447
+ g : t .Optional [bool ],
448
+ option_type : t .Optional [OptionType ],
449
+ include_hooks : t .Optional [bool ],
450
+ include_parents : t .Optional [bool ],
451
+ values_only : t .Literal [True ],
452
+ ) -> t .List [str ]:
453
+ ...
454
+
455
+ @t .overload
456
+ def show_options (
457
+ self ,
458
+ g : t .Optional [bool ],
459
+ option_type : t .Optional [OptionType ],
460
+ include_hooks : t .Optional [bool ],
461
+ include_parents : t .Optional [bool ],
462
+ values_only : t .Literal [None ] = None ,
463
+ ) -> "WindowOptionDict" :
464
+ ...
465
+
466
+ @t .overload
467
+ def show_options (
468
+ self ,
469
+ g : t .Optional [bool ] = None ,
447
470
option_type : t .Optional [OptionType ] = None ,
471
+ include_hooks : t .Optional [bool ] = None ,
472
+ include_parents : t .Optional [bool ] = None ,
473
+ values_only : t .Literal [False ] = False ,
448
474
) -> "WindowOptionDict" :
475
+ ...
476
+
477
+ def show_options (
478
+ self ,
479
+ g : t .Optional [bool ] = False ,
480
+ option_type : t .Optional [OptionType ] = None ,
481
+ include_hooks : t .Optional [bool ] = None ,
482
+ include_parents : t .Optional [bool ] = None ,
483
+ values_only : t .Optional [bool ] = False ,
484
+ ) -> t .Union ["WindowOptionDict" , t .List [str ]]:
449
485
"""Return a dict of options for the window.
450
486
451
487
For familiarity with tmux, the option ``option`` param forwards to pick a
@@ -469,6 +505,15 @@ def show_options(
469
505
assert option_type in OPTION_TYPE_FLAG_MAP
470
506
tmux_args += (OPTION_TYPE_FLAG_MAP [option_type ],)
471
507
508
+ if include_parents is not None and include_parents :
509
+ tmux_args += ("-A" ,)
510
+
511
+ if include_hooks is not None and include_hooks :
512
+ tmux_args += ("-H" ,)
513
+
514
+ if values_only is not None and values_only :
515
+ tmux_args += ("-v" ,)
516
+
472
517
cmd = self .cmd ("show-options" , * tmux_args )
473
518
474
519
output = cmd .stdout
0 commit comments