# command-alias

Source: https://libtmux.org/en/tmux/latest/catalog/options/command-alias/

> This is an array of custom aliases for commands.

option tmux3.7c

This is an array of custom aliases for commands.

* Scope

  server

* Type

  Text, array of values

* Default

  Show the default

  ```
  split-pane=split-window,splitp=split-window,server-info=show-messages -JT,info=show-messages -JT,choose-window=choose-tree -w,choose-session=choose-tree -s
  ```

* Separator

  `,`

* Set

  [`set-option`](https://libtmux.org/en/tmux/latest/manual/set-option/) `-s command-alias value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/latest/manual/show-options/) `-s command-alias`

## Description[#](https://libtmux.org/en/tmux/latest/catalog/options/command-alias/#description)

This is an array of custom aliases for commands. If an unknown command matches `name`, it is replaced with `value`. For example, after:

`set -s command-alias[100] zoom='resize-pane -Z'`

Using:

`zoom -t:.1`

Is equivalent to:

`resize-pane -Z -t:.1`

Note that aliases are expanded when a command is parsed rather than when it is executed, so binding an alias with [`bind-key`](https://libtmux.org/en/tmux/latest/manual/bind-key/) will bind the expanded form.

## Releases[#](https://libtmux.org/en/tmux/latest/catalog/options/command-alias/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/command-alias/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/command-alias/) : present

## Source[#](https://libtmux.org/en/tmux/latest/catalog/options/command-alias/#source)

* Defined in

  [`options-table.c:297`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L297)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/latest/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/latest/manual/full/#options-command-alias)

## Used by[#](https://libtmux.org/en/tmux/latest/catalog/options/command-alias/#used-by)

Library documentation that names this option.

* Python

  [`libtmux_mcp.tools.option_tools.set_option`](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-set_option/), [`libtmux._internal.sparse_array.SparseArray`](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-sparsearray/)

* Rust

  [`options.generated.COMMAND_ALIAS`](https://libtmux.org/en/rs/latest/reference/options-generated-command_alias/), [`server.Server.array_option`](https://libtmux.org/en/rs/latest/reference/server-server-array_option/), [`server.Server.options`](https://libtmux.org/en/rs/latest/reference/server-server-options/), [`session.Session.options`](https://libtmux.org/en/rs/latest/reference/session-session-options/), [`window.Window.options`](https://libtmux.org/en/rs/latest/reference/window-window-options/)

* Go

  [`tmux.CommandAlias`](https://libtmux.org/en/go/latest/reference/tmux-commandalias/), [`tmux.CommandAliases`](https://libtmux.org/en/go/latest/reference/tmux-commandaliases/), [`tmux.Server.SetCommandAlias`](https://libtmux.org/en/go/latest/reference/tmux-server-setcommandalias/), [`tmux.ServerOptionValues.CommandAlias`](https://libtmux.org/en/go/latest/reference/tmux-serveroptionvalues-commandalias/), [`tmux.ServerOptionValues.CommandAliases`](https://libtmux.org/en/go/latest/reference/tmux-serveroptionvalues-commandaliases/)

* Java

  [`io.github.libtmux.Options`](https://libtmux.org/en/java/latest/reference/io-github-libtmux-options-options/)
