Server.setHook(_:to:at:in:)
Swift
- Python Bind a command to a global hook Python Bind a command to a session hook Python Bind a command to a window hook Python Bind a command to a pane hook
- Ruby Unavailable
- Lua Bind a command to a global hook Lua Bind a command to a session hook Lua Bind a command to a window hook Lua Bind a command to a pane hook
- TypeScript Bind a command to a global hook TypeScript Bind a command to a session hook TypeScript Bind a command to a window hook TypeScript Bind a command to a pane hook
- Rust Bind a command to a global hook Rust Bind a command to a session hook Rust Bind a command to a window hook Rust Bind a command to a pane hook
- Go Bind a command to a session hook Go Bind a command to a window hook Go Bind a command to a pane hook
- Java Unavailable
- .NET Unavailable
- C++
- Swift
- Declared in
- Server
- Package
- libtmux-swift
- Source
- Sources/LibTmux/Options.swift
- Other languages
- Python Ruby LuaTypeScriptRustGo Java .NET C++
-
-
Binds a command to a hook.
Without an index this replaces every command bound to the name, leaving the one given at slot 0 — tmux assigns the array, not just an element. Pass
at:to write one slot and leave its neighbours alone.A name tmux does not know is a reply reporting why, not a thrown error.
- Parameters:
- name: a hook name tmux knows, such as
after-new-window. - command: the tmux command line to run, unparsed until tmux runs it.
- index: which slot to write, or every slot when omitted.
- scope: which table to write to.
- name: a hook name tmux knows, such as
- Raises
Discussed in Options and hooks
In other ports Bind a command to a global hook
- Python
libtmux.Server.set_hook - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.Server:set_hook - TypeScript
server.Server.setHook - Rust
server.Server.set_hook - Go no equivalent on
Server - Java reached through
Server.hooks, whoseHookscarries the write - .NET reached through
Server.Hooks, whoseTmuxHookscarries the write - C++ no equivalent on
Server
In other ports Bind a command to a session hook
- Python
libtmux.Session.set_hook - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.Session:set_hook - TypeScript
session.Session.setHook - Rust
session.Session.set_hook - Go
tmux.Session.SetHook - Java reached through
Session.hooks, whoseHookscarries the write - .NET reached through
Session.Hooks, whoseTmuxHookscarries the write - C++
libtmux::Session::set_hook
In other ports Bind a command to a window hook
- Python
libtmux.Window.set_hook - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.Window:set_hook - TypeScript
window.Window.setHook - Rust
window.Window.set_hook - Go
tmux.Window.SetHook - Java reached through
Window.hooks, whoseHookscarries the write - .NET reached through
Window.Hooks, whoseTmuxHookscarries the write - C++ no equivalent on
Window
In other ports Bind a command to a pane hook
- Python
libtmux.Pane.set_hook - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.Pane:set_hook - TypeScript
pane.Pane.setHook - Rust
pane.Pane.set_hook - Go
tmux.Pane.SetHook - Java reached through
Pane.hooks, whoseHookscarries the write - .NET reached through
Pane.Hooks, whoseTmuxHookscarries the write - C++ no equivalent on
Pane
- Parameters:
0 declared, 0 inherited