# LibTmux.Server.renameSessionWith

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/663e212622a02aa74a9bdc8ff71e2b45fcb1d4d5/src/LibTmux/Server.hs#L201
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-renamesessionwith/

```haskell
renameSessionWith
  :: MutationOptions
  -> Server
  -> SessionRef
  -> Text
  -> IO ()
```

Signature types: [`MutationOptions`](/en/haskell/latest/reference/libtmux-server-t-mutationoptions/), [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`SessionRef`](/en/haskell/latest/reference/libtmux-snapshot-t-sessionref/), [`Text`](https://hackage.haskell.org/package/text-2.1.3/docs/Data-Text.html#t:Text), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO).

[`renameSession`](/en/haskell/latest/reference/libtmux-server-v-renamesession/) with an explicit [`timeout`](/en/haskell/latest/reference/libtmux-server-v-mutationoptions-timeout/). A known primary rejection raises
 [`MutationRejected`](/en/haskell/latest/reference/libtmux-server-v-mutationrejected/); an applied command with a failed hook raises
 [`MutationAppliedWithErrors`](/en/haskell/latest/reference/libtmux-server-v-mutationappliedwitherrors/). Neither result implies rollback.

## Referenced declarations

- [`LibTmux.Server.MutationOptions`](/en/haskell/latest/reference/libtmux-server-t-mutationoptions/) (data type)
- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)
- [`LibTmux.Snapshot.SessionRef`](/en/haskell/latest/reference/libtmux-snapshot-t-sessionref/) (data type)

## tmux command

The tmux commands behind `renameSessionWith`.

- [`rename-session`](/en/tmux/latest/manual/rename-session/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_rename_session_entry`](/en/tmux/latest/reference/c-variable-cmd_rename_session_entry/) (attribute)
- [`cmd_rename_session_exec`](/en/tmux/latest/reference/c-function-cmd-rename-session-c-cmd_rename_session_exec/) (function)
