Core Library0.xAPI reference

Choose documentation 2

latest

Current version

latest
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

cmdlet libtmux-powershell

LibTmux.Set-TmuxHook

Set a hook entry and optionally return its grouped readback.

Source and package
Qualified name
LibTmux\Set-TmuxHook
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SetTmuxHookCommand.cs

Description

Pass a tmux command string to one hook or indexed entry. tmux normalizes the stored command text; native readback keeps that syntax unchanged so it can be supplied again. An unindexed set replaces existing entries. Append keeps existing entries and lets tmux select a free index; use explicit indices when order matters. PassThru emits the whole grouped hook readback. WhatIf performs no tmux I/O.

Notes

Server hooks are the global hook table; tmux has no separate server hook table. Choose a hook supported by the selected scope. Scope and Global pass through to tmux without remapping the owner. Empty pipelines do no I/O. Errors retain the native owner and core exception; Continue permits later owners and Stop terminates. Cancellation cannot undo commands already dispatched. Multiple mutations are sequential, not an atomic replacement.

Command details

Command type
cmdlet
Default parameter set
Server
Confirmation
Supports -WhatIf and -Confirm; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server: A native server owner.; LibTmux.Session: A native session owner.; LibTmux.Window: A native window owner.; LibTmux.Pane: A native pane owner.
Outputs
LibTmux.TmuxHook
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.TmuxHook: The complete native grouped hook, only with PassThru.

Examples

Example 1 Store one indexed command on a native $session and inspect the grouped result. View source

Terminal window
$command = 'display-message "build finished"'
$session |
LibTmux\Set-TmuxHook -Name 'alert-bell[7]' -Command $command -PassThru

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\Set-TmuxHook.

tmux command

task material

The tmux commands behind Set-TmuxHook.

tmux C API

task material

The C declarations in tmux that implement these commands.

Esc
Search in

Type to search.

Reference previewOpen reference