Server.versionAtLeast
Whether this server is at least minimum, written the way tmux writes it.
Source and package
- Qualified name
-
Server.version At Least - Module
- server
- Declared in
Server- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
-
Description#
This is how a caller gates on a feature that arrived in a known release without parsing
#{version}themselves. A named development build such asnext-3.9has not shipped the release it names: it is at least3.8, but not at least3.9. A candidate such asX.Y-rcNranks the same way, belowX.Yand above the release before it.minimummust be a form tmux prints, such as3.7a, or the call throws aTypeError.Examples#
if (await server.versionAtLeast("3.5")) {await server.setHook("command-error", "display-message 'a command failed'");}