Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function LibTmux.jl latest

set_hook

Module LibTmux.set_hook LibTmux
Source and package
Module
LibTmux
Package
LibTmux
Source
src/configuration.jl

Methods#

set_hook( connection::LibTmux.ControlConnection, scope, name::AbstractString, command::AbstractString; index, kwargs... )[source]#

Store tmux command grammar using literal unquoted command names and printable arguments, single/double quotes, literal punctuation escapes and semicolon sequences. Environment/tilde expansion, comments, command blocks and decoded control escapes are refused before writing. Single quotes preserve literal backslash and dollar text. This is a deliberately bounded storage grammar; commands must also obey the connection's trusted hook contract when executed.

set_hook(connection::ControlConnection, scope, name, command; index=nothing, kwargs...)

Without index , replace the whole array; an empty body masks inherited hooks. An indexed empty body is invalid. tmux may clear a whole array before reporting a command parse error. Return ControlResult without rollback or replay.

set_hook( server::LibTmux.Server, scope, name::AbstractString, command::AbstractString; index, kwargs... )[source]#

Store executable tmux command grammar; this is not a shell command or literal option value. tmux parses the body when stored and executes it when the hook fires. Without index , replace the whole command array; an empty body clears it and masks inherited hooks. A numeric index changes only that sparse entry. Return CommandResult ; parsing failures retain tmux's command error evidence. tmux may clear an existing whole array before reporting a parse failure. The library does not roll back or retry this mutation.

set_hook(server, scope, name, command; index=nothing, kwargs...)

Discussed in Ownership and I/O

Esc

Type to search.

Reference preview Open reference