On this page
window.Window.rename
- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
- Other languages
- PythonTypeScriptGoJava.NETC++Swift
-
Rename the window and update this handle.
The name belongs to the window, so every session linking it sees the change.
Errors
Returns an error when tmux refuses the name. tmux expands the name as a format before it checks it, so
#(command)in one runs a shell command. See [the crate documentation][crate#a-name-reaches-tmux-as-a-format] before passing text a caller supplied.In other languages Rename a window
- Python
libtmux.Window.rename_window - TypeScript
window.Window.rename - Go
tmux.Window.Rename - Java
io.github.libtmux.Window.Window.rename - .NET
LibTmux.Window.RenameAsync - C++
libtmux::Window::rename - Swift
Server.rename(_:to:)
- Python
Examples
>>> window = session.active_window >>> window.rename_window('My project')
Window(@1 1:My project, Session($1 ...)) >>> window.rename_window('New name')
Window(@1 1:New name, Session($1 ...)) await window.rename("editor"); 0 declared, 0 inherited