Skip to content

Commit 3f2fbdc

Browse files
committed
libtmux.constants: Add OptionScope and OPTION_SCOPE_FLAG_MAP
1 parent c9aa46e commit 3f2fbdc

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
@@ -50,3 +50,28 @@ class PaneDirection(enum.Enum):
5050
PaneDirection.Right: ["-h"],
5151
PaneDirection.Left: ["-h", "-b"],
5252
}
53+
54+
55+
class _DefaultOptionScope:
56+
# Sentinel value for default scope
57+
...
58+
59+
60+
DEFAULT_OPTION_SCOPE: _DefaultOptionScope = _DefaultOptionScope()
61+
62+
63+
class OptionScope(enum.Enum):
64+
"""Scope used with ``set-option`` and ``show-option(s)`` commands."""
65+
66+
Server = "SERVER"
67+
Session = "SESSION"
68+
Window = "WINDOW"
69+
Pane = "PANE"
70+
71+
72+
OPTION_SCOPE_FLAG_MAP: t.Dict[OptionScope, str] = {
73+
OptionScope.Server: "-s",
74+
OptionScope.Session: "",
75+
OptionScope.Window: "-w",
76+
OptionScope.Pane: "-p",
77+
}

0 commit comments

Comments
 (0)