Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxp search

Edit this page on GitHub

workspace consumer 0.1.0-alpha.10 · Source

tmuxp compatibility reference. Examples using tmuxp run the Python reference. Local CLI status describes this port’s implemented coverage.

Search discovered workspace fields using regular expressions or literal strings. Queries combine with AND unless --any selects OR.

Find workspaces by session nameLink to section

Terminal window
$ tmuxp search \
--json \
--fixed-strings \
--field session \
workspace

Field prefixes in query terms and repeated --field restrictions select name, session (s), path (p), window (w), or pane data. --ignore-case ignores case; --smart-case does so only when a pattern has no uppercase. --word-regexp requires whole words and --invert-match selects nonmatches.

JSON results contain "name", "path", "session_name", "source", matched_fields, and "matches". The pinned reference emits an empty byte stream for no matches, even with --json. With no query, machine search can print human help and return normally. An invalid regular expression can also yield no machine output. The native contract instead uses [] for an empty JSON result and usage status 2 for a missing or invalid pattern.

Python regular-expression behavior is part of compatibility. Native regex libraries differ in lookaround, backreferences, Unicode, flags, and word boundaries. Matching the options alone does not establish expression equivalence. See compatibility and output.

Arguments and flagsLink to section

Argument or flagsArity / defaultChoices or meaning
"query_terms"zero or moresearch patterns (prefix with field: for field-scoped search)
-f, --fieldvalue; Nonerestrict search to field(s): name, session/s, path/p, window/w, pane
-i, --ignore-caseflag; Falsecase-insensitive matching
-S, --smart-caseflag; Falsecase-insensitive unless pattern has uppercase
-F, --fixed-stringsflag; Falsetreat patterns as literal strings, not regex
-w, --word-regexpflag; Falsematch whole words only
-v, --invert-matchflag; Falseshow workspaces that do NOT match
--anyflag; Falsematch ANY pattern (OR logic); default is ALL (AND logic)
--jsonflag; Falseoutput as JSON
--ndjsonflag; Falseoutput as NDJSON (one JSON per line)

All commands accept -h / --help. Root options precede the command; see the CLI overview. The output reference distinguishes current Python flags from native all-command JSON and NDJSON.

Parser and implementation source.

tmuxp reference source.

Esc

Type to search.