Many nux commands accept a project pattern instead of an exact name. The special character + means “zero or more characters” and can appear anywhere in the pattern.
Where + can appear#
- Suffix:
web+matches names starting withweb(e.g.web-app,web-admin) - Prefix:
+wikimatches names ending withwiki(e.g.dev-wiki,team-wiki) - Infix:
+api+matches any name containingapi(e.g.my-api-server) - Multiple:
w+a+matches names starting withwthat also containa
Internally, each + is translated to .* and the pattern is anchored as ^...$, so it must match the full project name.
Why + instead of *#
Using + avoids shell glob expansion. You do not need to quote patterns; nux web+ works as intended without special escaping.
What gets matched#
Patterns match against three sources:
- Config files - project names from
~/.config/nux/projects/*.yaml - Directories - directory names under your configured
project_dirspath(s) - Running sessions - active tmux session names
Duplicates are removed (e.g. a project with both a config file and a directory counts once). Zoxide-only entries are not included. Results are sorted alphabetically.
Commands that support patterns#
nux <pattern>- start or attach to all matching projectsnux stop <pattern>- stop all matching sessions
nux restart does not support patterns - it takes exactly one session argument.
Errors#
If no projects match the pattern, nux reports:
no projects or sessions matched pattern: <pattern>Examples#
# Start all projects starting with "web"
nux web+
# Stop all projects containing "api"
nux stop +api+
# Start all projects ending with "wiki"
nux +wiki