Skip to content

Commit e4722dc

Browse files
committed
constants(fix[HOOK_SCOPE_FLAG_MAP]): Map Server scope to -g flag
why: Server.set_hook() was broken - HOOK_SCOPE_FLAG_MAP[Server] was "" which added an empty string argument to tmux commands. Server/global hooks require -g flag per tmux documentation. what: - Change OptionScope.Server from "" to "-g" in HOOK_SCOPE_FLAG_MAP - Fixes Server.set_hook(), Server.show_hooks(), Server.run_hook()
1 parent 3d37594 commit e4722dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libtmux/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class OptionScope(enum.Enum):
7878
}
7979

8080
HOOK_SCOPE_FLAG_MAP: dict[OptionScope, str] = {
81-
OptionScope.Server: "",
81+
OptionScope.Server: "-g",
8282
OptionScope.Session: "",
8383
OptionScope.Window: "-w",
8484
OptionScope.Pane: "-p",

0 commit comments

Comments
 (0)