Predicates are used by both when and requires.
- each predicate list is an AND
!negates a single predicate atom- predicates are parsed by
conch - during
check,init, andexplain, predicates remain descriptive and are not evaluated against the host - during
build,shell,command,file,dir,os, andhostnameare folded on the current machine, whileinteractive,login, and allenv:*predicates remain runtime checks - any predicates that survive are evaluated by the generated shell code when sourced
Session is interactive.
Session is a login shell.
Target shell matches the given shell name. Examples:
shell:fishshell:bash
A command exists in PATH.
Example:
command:nvim
An environment variable exists and is non-empty. Example:
env:EDITOR
An environment variable equals a literal value. Example:
env:VISUAL=nvim
A path exists (file or directory). Example:
file:~/.config/nvim/init.luafile:~/.config/nvim
A path exists and is a directory. Example:
dir:~/.config/nvim
Operating system matches a name. Example:
os:linux
Hostname matches a name. Example:
hostname:workstation
!interactive!command:nvim!env:EDITOR
when = ["interactive", "shell:fish"]
requires = ["command:nvim"]
when = ["!env:EDITOR"]
requires = ["file:~/.local/bin/nvim"]
requires = ["dir:~/.local/bin"]- conch validates predicate syntax but does not evaluate predicates during check/init/explain
buildfolds onlyshell,command,file,dir,os, andhostname, and does so on the current machine- providers compile any remaining predicates into shell-native checks
- conflict detection does not attempt predicate satisfiability or mutual-exclusion reasoning