Skip to content

Commit fb6edfc

Browse files
committed
feat(Server): Use OptionMixin for Server.set_option, Server.show_option(s)
1 parent 26d6a44 commit fb6edfc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libtmux/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from libtmux._internal.query_list import QueryList
1616
from libtmux.common import tmux_cmd
17+
from libtmux.constants import OptionScope
1718
from libtmux.neo import fetch_objs
1819
from libtmux.pane import Pane
1920
from libtmux.session import Session
@@ -22,6 +23,7 @@
2223
from . import exc, formats
2324
from .common import (
2425
EnvironmentMixin,
26+
OptionMixin,
2527
PaneDict,
2628
SessionDict,
2729
WindowDict,
@@ -37,7 +39,7 @@
3739
logger = logging.getLogger(__name__)
3840

3941

40-
class Server(EnvironmentMixin):
42+
class Server(EnvironmentMixin, OptionMixin):
4143
""":term:`tmux(1)` :term:`Server` [server_manual]_.
4244
4345
- :attr:`Server.sessions` [:class:`Session`, ...]
@@ -101,6 +103,9 @@ class Server(EnvironmentMixin):
101103
formatter_prefix = "server_"
102104
"""Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
103105

106+
default_scope: t.Optional[OptionScope] = OptionScope.Server
107+
"""For option setting."""
108+
104109
def __init__(
105110
self,
106111
socket_name: t.Optional[str] = None,

0 commit comments

Comments
 (0)