TmuxVersion
A released tmux version, ordered the way tmux releases are.
Source and package
- Qualified name
-
io.github .libtmux. Tmux Version - Package
- io.github.libtmux
- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/TmuxVersion.java
-
Description#
tmux numbers a patch release with a letter rather than a third number: 3.7a follows 3.7, and 3.3a follows 3.3. Comparing the text alone gets that wrong in both directions, and a feature gate that gets it wrong reads a format the running tmux does not have.
Between releases, tmux reports itself as
next-M.m: a development build tracking toward the release named, not that release itself. It has everything the previous release shipped and nothing later's patches guarantee, so it sorts strictly between the two — above every patch of the release before it, below the release it names and every patch of that.A release candidate,
X.Y-rc, orders below the release it names (next-X.Y < X.Y-rc < X.Y-rc2 < X.Y < X.Ya), so#compareTo()agrees with#equals, and#atLeast()follows the same order. A gate names the release that ships the behaviour, such as3.8for JSON layouts. A gate on one release's own bug asks#sameRelease(). The version is written back exactly as tmux wrote it, which matters beyond display: every capture is fenced on the version tmux reports, and a version printed in any other spelling fails that fence on every read.- Parameters
-
-
patch(String) # – the patch letter, or empty for an unlettered release -
development(boolean) # – whether this is anext-M.mbuild rather than the releaseM.mitself -
preRelease(String) # – the release candidate this is, such asrcorrc2, or empty for a release
Members12#
- atLeast method Whether this version ranks at or above the given one in
#compareTo()'s order. - compareTo method
next-X.Y < X.Y-rc < X.Y-rcN < X.Y < X.Ya, so it agrees with#equals. - development method whether this is a
next-M.mbuild rather than the releaseM.mitself - major method the major number
- MINIMUM: Tmux
Version attribute The oldest tmux this library supports; an older one is refused before any request is sent. - minor method the minor number
- parse method Reads what tmux reports for
#{version}. - patch method the patch letter, or empty for an unlettered release
- preRelease method the release candidate this is, such as
rcorrc2, or empty for a release - sameRelease method Whether this is the named release, a release candidate for it included.
next-builds and other releases are not. For a gate on one release's own bug. - TmuxVersion method A release or a development build, without a release candidate.
- toString method