Skip to content

Commit 2541b0d

Browse files
committed
feat(Server): Use OptionsMixin for Server.set_option, Server.show_option(s)
1 parent ae72124 commit 2541b0d

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
@@ -18,6 +18,7 @@
1818
from libtmux import exc, formats
1919
from libtmux._internal.query_list import QueryList
2020
from libtmux.common import tmux_cmd
21+
from libtmux.constants import OptionScope
2122
from libtmux.neo import fetch_objs
2223
from libtmux.pane import Pane
2324
from libtmux.session import Session
@@ -31,6 +32,7 @@
3132
has_gte_version,
3233
session_check_name,
3334
)
35+
from .options import OptionsMixin
3436

3537
if t.TYPE_CHECKING:
3638
import types
@@ -45,7 +47,7 @@
4547
logger = logging.getLogger(__name__)
4648

4749

48-
class Server(EnvironmentMixin):
50+
class Server(EnvironmentMixin, OptionsMixin):
4951
""":term:`tmux(1)` :term:`Server` [server_manual]_.
5052
5153
- :attr:`Server.sessions` [:class:`Session`, ...]
@@ -118,6 +120,9 @@ class Server(EnvironmentMixin):
118120
formatter_prefix = "server_"
119121
"""Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
120122

123+
default_option_scope: OptionScope | None = OptionScope.Server
124+
"""For option management."""
125+
121126
def __init__(
122127
self,
123128
socket_name: str | None = None,

0 commit comments

Comments
 (0)