Skip to content

Commit 678e320

Browse files
committed
hooks.py(fix[_show_hook, show_hook]): Remove invalid ignore_errors parameter
why: tmux show-hooks does not accept -q flag. Verified against ~/study/c/tmux/cmd-show-options.c:67 which shows show-hooks accepts "gpt:w" only. what: - Remove ignore_errors parameter from _show_hook() signature - Remove ignore_errors parameter from show_hook() signature - Remove ignore_errors flag handling code - Remove ignore_errors from _show_hook() call in show_hook()
1 parent 2e9de2c commit 678e320

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/libtmux/hooks.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ def _show_hook(
319319
hook: str,
320320
global_: bool = False,
321321
scope: OptionScope | _DefaultOptionScope | None = DEFAULT_OPTION_SCOPE,
322-
ignore_errors: bool | None = None,
323322
) -> list[str] | None:
324323
"""Return value for the hook.
325324
@@ -352,9 +351,6 @@ def _show_hook(
352351
else:
353352
flags += (flag,)
354353

355-
if ignore_errors is not None and ignore_errors:
356-
flags += ("-q",)
357-
358354
flags += (hook,)
359355

360356
cmd = self.cmd("show-hooks", *flags)
@@ -369,7 +365,6 @@ def show_hook(
369365
hook: str,
370366
global_: bool = False,
371367
scope: OptionScope | _DefaultOptionScope | None = DEFAULT_OPTION_SCOPE,
372-
ignore_errors: bool | None = None,
373368
) -> str | int | SparseArray[str] | None:
374369
"""Return value for a hook.
375370
@@ -412,7 +407,6 @@ def show_hook(
412407
hook=hook,
413408
global_=global_,
414409
scope=scope,
415-
ignore_errors=ignore_errors,
416410
)
417411
if hooks_output is None:
418412
return None

0 commit comments

Comments
 (0)