Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-ts latest

Selection.where

Keep the members matching declarative criteria.

Source and package
Qualified name
Selection.where
Module
selection
Declared in
Selection
Package
libtmux
Source
packages/libtmux/src/selection.ts

Description#

Criteria are data: equality, string operators, AND/OR/NOT, regular expressions expressed as { pattern, flags }, and quantifiers over relations. Matching is case-sensitive unless a criterion says otherwise.

Examples#

snapshot.panes.where({ currentCommand: "vim" });
snapshot.windows.where({ name: { startsWith: "log" } });
Type parameters
Parameters
Raises
  • VersionTooLowError – when a criterion names a field newer than the tmux that answered. Such a field is not absent from the data, it is absent from that release, and matching it against nothing would answer "no member has this" — which is a different statement and the one a caller would act on. The error names the field, the release that has it, and the release running.

Guides#

Pages that discuss where.

Esc

Type to search.

Reference previewOpen reference