libtmux Reference MCP Search
On this page

selection.Selection.filter

View as Markdown

Module
selection
Declared in
Selection
Package
@libtmux/libtmux
Source
packages/libtmux/src/selection.ts
filter ( predicate : : (value: Model, index: number, values: readonly Model[]) => value is Narrowed , thisArg : : unknown ) Selection<Narrowed> ( predicate : : (value: Model, index: number, values: readonly Model[]) => unknown , thisArg : : unknown ) Selection<Model>
methodoverload2 overloads [source]
methodoverload2 overloads [source]
filter

Keep the members predicate accepts.

For a question that has to run code. When the question can be expressed as criteria, where says the same thing as data — which can be logged, sent to another process, or stored.

Examples

snapshot.panes.filter((entry) => entry.currentCommand?.startsWith("v") === true);

Discussed in Filtering and queries

0 declared, 0 inherited

Esc

Type to search.