# LibTmux.Window.RenameAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Window.Lifecycle.cs#L26
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-window-renameasync/

tmux command: [`rename-window`](/en/tmux/latest/manual/rename-window/)

```
LibTmux.Window.RenameAsync(name: string, cancellationToken: CancellationToken) -> Task<Window>
```

Renames this window.

tmux expands the name as a format, so a <c>#</c> in it does not survive
verbatim.

## Parameters

- `name` (`string`): The new name.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

A replacement handle carrying the new name.
