Skip to content

Commit d9d5f62

Browse files
committed
feat(Server): Use OptionMixin for Server.set_option, Server.show_option(s)
1 parent f22136d commit d9d5f62

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
@@ -15,6 +15,7 @@
1515

1616
from libtmux._internal.query_list import QueryList
1717
from libtmux.common import tmux_cmd
18+
from libtmux.constants import OptionScope
1819
from libtmux.neo import fetch_objs
1920
from libtmux.pane import Pane
2021
from libtmux.session import Session
@@ -29,6 +30,7 @@
2930
has_gte_version,
3031
session_check_name,
3132
)
33+
from .options import OptionMixin
3234

3335
if t.TYPE_CHECKING:
3436
from typing_extensions import TypeAlias
@@ -38,7 +40,7 @@
3840
logger = logging.getLogger(__name__)
3941

4042

41-
class Server(EnvironmentMixin):
43+
class Server(EnvironmentMixin, OptionMixin):
4244
""":term:`tmux(1)` :term:`Server` [server_manual]_.
4345
4446
- :attr:`Server.sessions` [:class:`Session`, ...]
@@ -102,6 +104,9 @@ class Server(EnvironmentMixin):
102104
formatter_prefix = "server_"
103105
"""Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
104106

107+
default_option_scope: t.Optional[OptionScope] = OptionScope.Server
108+
"""For option management."""
109+
105110
def __init__(
106111
self,
107112
socket_name: t.Optional[str] = None,

0 commit comments

Comments
 (0)