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.

struct libtmux-go latest

ClientFilter

ClientFilter matches materialized Client values without tmux I/O. Its zero value matches every non-nil candidate. Criteria are ANDed; AnyOf adds an OR requirement and Not excludes. Field and relation criteria correspond to Client.Name, Client.ReadOnly, Client.AttachedSession, Client.AttachedWindow, and Client.AttachedPane. ClientFilter.Validate and methods that consume the filter reject invalid criteria with ErrInvalidFilter.

Source and package
Qualified name
tmux.ClientFilter
Package
tmux
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/filter_generated.go
struct tmux.ClientFilter

Fields10#

ClientFilter fields
NameTypeDescription
AnyOf []ClientFilter AnyOf additionally requires at least one branch to match after ordinary criteria match. A nil slice leaves AnyOf unset; a non-nil empty slice is invalid.
Name *ClientName Name exactly matches the stable tmux client name from Client.Name. A nil pointer leaves Name unset; a non-nil pointer applies it, including when it points to the zero value.
NameContains *string NameContains requires the stable tmux client name from Client.Name to contain the pointed-to substring. A nil pointer leaves NameContains unset; a non-nil pointer applies it, and an empty string matches every available string.
NameIn []ClientName NameIn lists accepted values for the stable tmux client name from Client.Name. A candidate matches when its materialized value equals one listed value. A nil slice leaves NameIn unset; a non-nil empty slice is invalid.
NameRegex string NameRegex requires the stable tmux client name from Client.Name to match Go regular expression syntax. An empty string leaves NameRegex unset.
Not *ClientFilter Not excludes a candidate when its nested filter matches. A nil pointer leaves Not unset.
Pane *PaneFilter Pane traverses the materialized attachment returned by Client.AttachedPane. A nil pointer leaves the relation criterion unset.
ReadOnly *bool ReadOnly exactly matches the materialized read-only state from Client.ReadOnly. A nil pointer leaves ReadOnly unset; a non-nil pointer applies it, including when it points to the zero value.
Session *SessionFilter Session traverses the materialized attachment returned by Client.AttachedSession. A nil pointer leaves the relation criterion unset.
Window *WindowFilter Window traverses the materialized attachment returned by Client.AttachedWindow. A nil pointer leaves the relation criterion unset.

Members4#

  • MarshalJSON method MarshalJSON validates and encodes the client filter; failures wrap ErrInvalidFilter.
  • Predicate method Predicate validates the client filter and returns a local predicate for Client values materialized by a Snapshot; it never runs tmux. It traverses only loaded relations and returns false for a nil candidate.
  • UnmarshalJSON method UnmarshalJSON clears the receiver, strictly decodes a client filter, then validates it. Unknown or duplicate fields, trailing data, and semantic failures wrap ErrInvalidFilter; the receiver may retain decoded state on error.
  • Validate method Validate checks structure, regular expressions, and contradictory criteria; failures wrap ErrInvalidFilter.

Guides#

Pages that discuss ClientFilter.

Esc

Type to search.

Reference previewOpen reference