Skip to content

Commit ca39170

Browse files
committed
libtmux.constants: Add OptionScope and OPTION_SCOPE_FLAG_MAP
1 parent 02727a7 commit ca39170

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/libtmux/constants.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,28 @@ class PaneDirection(enum.Enum):
5151
PaneDirection.Right: ["-h"],
5252
PaneDirection.Left: ["-h", "-b"],
5353
}
54+
55+
56+
class _DefaultOptionScope:
57+
# Sentinel value for default scope
58+
...
59+
60+
61+
DEFAULT_OPTION_SCOPE: _DefaultOptionScope = _DefaultOptionScope()
62+
63+
64+
class OptionScope(enum.Enum):
65+
"""Scope used with ``set-option`` and ``show-option(s)`` commands."""
66+
67+
Server = "SERVER"
68+
Session = "SESSION"
69+
Window = "WINDOW"
70+
Pane = "PANE"
71+
72+
73+
OPTION_SCOPE_FLAG_MAP: dict[OptionScope, str] = {
74+
OptionScope.Server: "-s",
75+
OptionScope.Session: "",
76+
OptionScope.Window: "-w",
77+
OptionScope.Pane: "-p",
78+
}

0 commit comments

Comments
 (0)