Skip to content

Commit 504b19e

Browse files
committed
feat(Server): Use OptionsMixin for Server.set_option, Server.show_option(s)
1 parent 7baddf2 commit 504b19e

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
@@ -17,6 +17,7 @@
1717

1818
from libtmux._internal.query_list import QueryList
1919
from libtmux.common import tmux_cmd
20+
from libtmux.constants import OptionScope
2021
from libtmux.neo import fetch_objs
2122
from libtmux.pane import Pane
2223
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
from typing_extensions import TypeAlias
@@ -40,7 +42,7 @@
4042
logger = logging.getLogger(__name__)
4143

4244

43-
class Server(EnvironmentMixin):
45+
class Server(EnvironmentMixin, OptionsMixin):
4446
""":term:`tmux(1)` :term:`Server` [server_manual]_.
4547
4648
- :attr:`Server.sessions` [:class:`Session`, ...]
@@ -104,6 +106,9 @@ class Server(EnvironmentMixin):
104106
formatter_prefix = "server_"
105107
"""Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
106108

109+
default_option_scope: OptionScope | None = OptionScope.Server
110+
"""For option management."""
111+
107112
def __init__(
108113
self,
109114
socket_name: str | None = None,

0 commit comments

Comments
 (0)