Skip to content

Commit a737b7e

Browse files
committed
docs(filtering[rename]): "C-side" → "native" across docstrings and CHANGES
why: "C-side" leaks tmux's implementation language (C) into prose about an architectural distinction — filter evaluated in tmux's own format engine vs. re-filtered in Python. "Native" reads cleanly as "tmux's own", parallels "Python-side", and avoids the language conflation. what: - Rename the MyST anchor (c-side-filtering)= to (native-filtering)= in docs/topics/filtering.md; update the 9 {ref} cites across server.py, session.py, window.py, neo.py, clients.md, traversal.md. - Replace "tmux's C-side <noun>" with "tmux's native <noun>" in 7 docstring locations + 1 test docstring. - Rename the filtering.md section heading "C-Side Filtering" to "Native Filtering" and the comparison subsection "Python-side vs. C-side" to "Python-side vs. native". - Rename the CHANGES section heading and lead-paragraph mention to match. Net zero line count (24 inserted, 24 deleted) — pure prose rename. No functional or type changes; pytest, ruff, ty, and the docs build are unchanged from pre-rename.
1 parent 07be688 commit a737b7e

9 files changed

Lines changed: 24 additions & 24 deletions

File tree

CHANGES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ _Notes on the upcoming release will go here._
4747

4848
libtmux 0.57.0 broadens tmux support. It introduces
4949
{class}`~libtmux.Client` as a first-class object, threads tmux's
50-
C-side ``-f`` filter through the typed listing methods so callers can
50+
native ``-f`` filter through the typed listing methods so callers can
5151
push predicates into the tmux server, and adds typed access to many
5252
more format tokens — all scope- and version-gated so they're safe on
5353
every supported tmux version. Subcommand context now flows through
@@ -193,7 +193,7 @@ call in :func:`warnings.catch_warnings` with
193193
``filterwarnings("error")``. See {doc}`MIGRATION` for the escalation
194194
pattern.
195195

196-
#### C-side filter on typed listing methods (#672)
196+
#### Native filter on typed listing methods (#672)
197197

198198
{meth}`~libtmux.Server.search_panes`,
199199
{meth}`~libtmux.Server.search_windows`,

docs/topics/clients.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ For tmux-server-side filtering (no Python-side iteration), use
9090
{meth}`~libtmux.Server.search_sessions`-style predicate strings via
9191
the `-f` flag — but note that `list-clients` only accepts a single
9292
filter and exposes a narrower token vocabulary than sessions/windows.
93-
See {ref}`c-side-filtering` for the predicate syntax.
93+
See {ref}`native-filtering` for the predicate syntax.
9494

9595
## When `attached_*` returns `None`
9696

@@ -111,4 +111,4 @@ can branch on truthiness without a `try`/`except`.
111111

112112
- {doc}`/api/libtmux.client` — autodoc reference
113113
- {ref}`about` — where `Client` fits in the overall object model
114-
- {ref}`c-side-filtering` — tmux-side filtering for `Server.clients`
114+
- {ref}`native-filtering` — tmux-side filtering for `Server.clients`

docs/topics/filtering.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ True
258258
>>> w3.kill()
259259
```
260260

261-
(c-side-filtering)=
261+
(native-filtering)=
262262

263-
## C-Side Filtering with `search_*()`
263+
## Native Filtering with `search_*()`
264264

265265
`QueryList.filter()` runs in Python *after* tmux has returned every
266266
row. For large servers, or when you only need a handful of matches,
@@ -287,7 +287,7 @@ client-side predicate to tmux is rarely a hot path — a server's client
287287
count is bounded by attached terminals, not by session/window/pane
288288
fan-out.
289289

290-
### Python-side vs. C-side
290+
### Python-side vs. native
291291

292292
| | `.filter()` | `.search_*()` |
293293
|-|-------------|---------------|
@@ -377,5 +377,5 @@ Use `.filter()` when:
377377
## API Reference
378378

379379
See {class}`~libtmux._internal.query_list.QueryList` for the complete
380-
QueryList API, and each `search_*()` method for the C-side filter
380+
QueryList API, and each `search_*()` method for the native filter
381381
contract.

docs/topics/traversal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ True
139139
libtmux collections support Django-style filtering with `filter()` and `get()`.
140140
For comprehensive coverage of all lookup operators, see {ref}`querylist-filtering`.
141141
For tmux-server-side predicates (compiled and executed inside tmux, fewer round
142-
trips on large servers), see {ref}`c-side-filtering`.
142+
trips on large servers), see {ref}`native-filtering`.
143143

144144
### Basic Filtering
145145

src/libtmux/neo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def fetch_objs(
670670
engine evaluates as "false" — every row is suppressed and no
671671
stderr is emitted. A bad filter is indistinguishable from
672672
"filter matched nothing"; verify predicate syntax against the
673-
FORMATS section of ``tmux(1)``. See :ref:`c-side-filtering`
673+
FORMATS section of ``tmux(1)``. See :ref:`native-filtering`
674674
for the typed wrappers that share this caveat.
675675
676676
.. versionadded:: 0.57

src/libtmux/server.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ def list_buffers(
18751875
Without arguments returns tmux's default template
18761876
(``name: N bytes: "sample"``) — kept for backward compatibility.
18771877
Pass *format_string* to project a specific tmux format, or *filter*
1878-
to push a format-expression predicate into tmux's C-side evaluation
1878+
to push a format-expression predicate into tmux's native evaluation
18791879
(avoids parsing the default template in Python).
18801880
18811881
Parameters
@@ -2388,7 +2388,7 @@ def search_sessions(
23882388
*,
23892389
filter: str | None = None, # noqa: A002
23902390
) -> QueryList[Session]:
2391-
"""Sessions, optionally filtered by tmux's C-side format predicate.
2391+
"""Sessions, optionally filtered by tmux's native format predicate.
23922392
23932393
Like :attr:`Server.sessions` but adds an optional ``filter`` kwarg
23942394
that is plumbed through to ``$ tmux list-sessions -f <filter>``.
@@ -2420,7 +2420,7 @@ def search_sessions(
24202420
--------
24212421
:attr:`Server.sessions` : unfiltered :class:`QueryList` of every
24222422
session (Python-side ``.filter()`` runs against this).
2423-
:ref:`c-side-filtering` : when to pick ``search_*`` over
2423+
:ref:`native-filtering` : when to pick ``search_*`` over
24242424
``QueryList.filter()``.
24252425
24262426
Examples
@@ -2448,7 +2448,7 @@ def search_windows(
24482448
*,
24492449
filter: str | None = None, # noqa: A002
24502450
) -> QueryList[Window]:
2451-
"""All windows across sessions, optionally filtered by tmux's C-side predicate.
2451+
"""All windows across sessions, optionally filtered by tmux's native predicate.
24522452
24532453
Like :attr:`Server.windows` but with a ``filter`` kwarg plumbed to
24542454
``$ tmux list-windows -a -f <filter>``.
@@ -2475,7 +2475,7 @@ def search_windows(
24752475
:attr:`Server.windows` : unfiltered :class:`QueryList` of every
24762476
window across every session (Python-side ``.filter()`` runs
24772477
against this).
2478-
:ref:`c-side-filtering` : when to pick ``search_*`` over
2478+
:ref:`native-filtering` : when to pick ``search_*`` over
24792479
``QueryList.filter()``.
24802480
24812481
Examples
@@ -2506,7 +2506,7 @@ def search_panes(
25062506
*,
25072507
filter: str | None = None, # noqa: A002
25082508
) -> QueryList[Pane]:
2509-
"""All panes across the server, optionally filtered by tmux's C-side predicate.
2509+
"""All panes across the server, optionally filtered by tmux's native predicate.
25102510
25112511
Like :attr:`Server.panes` but with a ``filter`` kwarg plumbed to
25122512
``$ tmux list-panes -a -f <filter>``. This is the typed entry point
@@ -2537,7 +2537,7 @@ def search_panes(
25372537
--------
25382538
:attr:`Server.panes` : unfiltered :class:`QueryList` of every
25392539
pane (Python-side ``.filter()`` runs against this).
2540-
:ref:`c-side-filtering` : when to pick ``search_*`` over
2540+
:ref:`native-filtering` : when to pick ``search_*`` over
25412541
``QueryList.filter()``.
25422542
25432543
Examples

src/libtmux/session.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def search_windows(
207207
*,
208208
filter: str | None = None, # noqa: A002
209209
) -> QueryList[Window]:
210-
"""Windows in this session, optionally filtered by tmux's C-side predicate.
210+
"""Windows in this session, optionally filtered by tmux's native predicate.
211211
212212
Like :attr:`Session.windows` but with a ``filter`` kwarg plumbed to
213213
``$ tmux list-windows -t <session> -f <filter>``.
@@ -234,7 +234,7 @@ def search_windows(
234234
:attr:`Session.windows` : unfiltered :class:`QueryList` of every
235235
window in this session (Python-side ``.filter()`` runs
236236
against this).
237-
:ref:`c-side-filtering` : when to pick ``search_*`` over
237+
:ref:`native-filtering` : when to pick ``search_*`` over
238238
``QueryList.filter()``.
239239
240240
Examples
@@ -263,7 +263,7 @@ def search_panes(
263263
*,
264264
filter: str | None = None, # noqa: A002
265265
) -> QueryList[Pane]:
266-
"""Panes in this session, optionally filtered by tmux's C-side predicate.
266+
"""Panes in this session, optionally filtered by tmux's native predicate.
267267
268268
Like :attr:`Session.panes` but with a ``filter`` kwarg plumbed to
269269
``$ tmux list-panes -s -t <session> -f <filter>``.
@@ -290,7 +290,7 @@ def search_panes(
290290
:attr:`Session.panes` : unfiltered :class:`QueryList` of every
291291
pane in this session (Python-side ``.filter()`` runs against
292292
this).
293-
:ref:`c-side-filtering` : when to pick ``search_*`` over
293+
:ref:`native-filtering` : when to pick ``search_*`` over
294294
``QueryList.filter()``.
295295
296296
Examples

src/libtmux/window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def search_panes(
211211
*,
212212
filter: str | None = None, # noqa: A002
213213
) -> QueryList[Pane]:
214-
"""Panes in this window, optionally filtered by tmux's C-side predicate.
214+
"""Panes in this window, optionally filtered by tmux's native predicate.
215215
216216
Like :attr:`Window.panes` but with a ``filter`` kwarg plumbed to
217217
``$ tmux list-panes -t <window> -f <filter>``.
@@ -238,7 +238,7 @@ def search_panes(
238238
:attr:`Window.panes` : unfiltered :class:`QueryList` of every
239239
pane in this window (Python-side ``.filter()`` runs against
240240
this).
241-
:ref:`c-side-filtering` : when to pick ``search_*`` over
241+
:ref:`native-filtering` : when to pick ``search_*`` over
242242
``QueryList.filter()``.
243243
244244
Examples

tests/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def test_session_last_window_exception_tags_subcommand(session: Session) -> None
688688

689689

690690
def test_session_search_windows_filter(session: Session) -> None:
691-
"""``Session.list_windows(filter=...)`` filters via tmux's C-side -f flag."""
691+
"""``Session.list_windows(filter=...)`` filters via tmux's native -f flag."""
692692
session.new_window(window_name="gap7s_keep")
693693
session.new_window(window_name="other_drop")
694694

0 commit comments

Comments
 (0)