Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

module libtmux-elixir

ReleaseMap

Looks up native tmux names and flags in the source of exact upstream releases.

Source and package
Qualified name
LibTmux.ReleaseMap
Module
LibTmux
Package
libtmux
Source
lib/libtmux/release_map.ex
LibTmux.ReleaseMap

Description

Use releases/1 to choose between releases and lookup/2 to inspect a definition. A feature listed at 3.3 can predate the library's floor. The map keeps removals and flag argument changes between tagged releases.

A definition identifies a source file and commit. For a format, :availability distinguishes the native format table from a literal name a command or mode adds to its own context. A name that only the native manual lists has availability :documented. :build_conditions records source guards on settings and in static format callbacks. For example, the value of sixel_support depends on the daemon's build. User formats, computed names absent from the manual and configurable command aliases depend on the caller or daemon.

These pure functions read compiled data. Check a live daemon separately when a decision depends on its build, configuration or runtime state.

Examples

iex> LibTmux.ReleaseMap.releases({:command, "new-pane"})
{:ok, ["3.7", "3.7a", "3.7b", "3.7c", "3.8"]}
iex> {:ok, flag} = LibTmux.ReleaseMap.lookup("3.8", {:flag, "resize-pane", "-D"})
iex> {flag.source, flag.argument}
{"cmd-resize-pane.c", :optional}

Members6 members

  • definition/0: definition() :: %{ :name => String.t(), :source => String.t(), :commit => String.t(), :release => String.t(), optional(:alias) => String.t() | nil, optional(:argument) => :none | :required | :optional, optional(:build_conditions) => [String.t()], optional(:availability) => :table | :contextual | :documented, optional(:contexts) => [String.t()] } typealias A named declaration in one exact release and its upstream source commit.
  • lookup/2 function Looks up a command, flag, option, hook or format in one tagged release.
  • reason/0: reason() :: :unknown_release | :unlisted | :invalid_subject typealias A missing release, an unlisted name or flag, or malformed query input.
  • releases/0 function Lists the source releases in chronological order, including lettered patch releases.
  • releases/1 function Lists every indexed release that declares the subject.
  • subject/0: subject() :: {:command | :option | :hook | :format, String.t()} | {:flag, String.t(), String.t()} typealias A native name, or a short flag scoped to one native command.
Esc
Search in

Type to search.

Reference previewOpen reference