On this page
Server.setHook(_:to:at:in:)
- Declared in
- Server
- Package
- libtmux-swift
- Source
- Sources/LibTmux/Options.swift
-
-
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
- Parameters:
0 declared, 0 inherited