Skip to content

Commit 405a81c

Browse files
committed
libtmux.constants: Add OptionScope and OPTION_SCOPE_FLAG_MAP
1 parent 0ff1288 commit 405a81c

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

0 commit comments

Comments
 (0)