From 85338bb75fa4fbabfdbefeb995bdea04efaf2db4 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 24 Jan 2017 19:53:37 +0000 Subject: Add support for custom command aliases, this is an array option which contains items of the form "alias=command". This is consulted when an unknown command is parsed. --- tmux.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index b641909f..61396fbd 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2410,6 +2410,30 @@ Available server options are: Set the number of buffers; as new buffers are added to the top of the stack, old ones are removed from the bottom if necessary to maintain this maximum length. +.It Xo Ic command-alias[] +.Ar name=value +.Xc +This is an array of custom aliases for commands. +If an unknown command matches +.Ar name , +it is replaced with +.Ar value . +For example, after: +.Pp +.Dl set -s command-alias[2] zoom='resize-pane -Z' +.Pp +Using: +.Pp +.Dl zoom -t:.1 +.Pp +Is equivalent to: +.Pp +.Dl resize-pane -Z -t:.1 +.Pp +Note that aliases are expanded when a command is parsed rather than when it is +executed, so binding an alias with +.Ic bind-key +will bind the expanded form. .It Ic default-terminal Ar terminal Set the default terminal for new windows created in this session - the default value of the -- cgit