Core Library0.xAPI reference

Choose documentation 2

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

cmdlet libtmux-powershell

LibTmux.Rename-TmuxSession

Rename a native session and optionally emit its replacement.

Source and package
Qualified name
LibTmux\Rename-TmuxSession
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/RenameTmuxSessionCommand.cs

Description

Rename the supplied native LibTmux.Session. The endpoint and daemon generation come from that handle, so the session is named by its ID and not by its old name. Only that session changes.

With PassThru, return a new Session handle that carries the new name. The original handle keeps the name it captured and is stale after the rename. Without PassThru, emit no success object. tmux expands the name as a format, so a number sign in it does not survive verbatim. WhatIf performs no tmux I/O.

Notes

Failures use Tmux.SessionRenameFailed and retain the original core exception, its dispatch information and the failed owner. ErrorAction Continue permits later owners to be processed; ErrorAction Stop stops on the first failure. A missing target remains an error. No mutation is retried.

Command details

Command type
cmdlet
Confirmation
Supports -WhatIf and -Confirm; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Session: A native LibTmux.Session selected from an explicit endpoint.
Outputs
LibTmux.Session
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.Session: With PassThru, one replacement handle for each input. Otherwise no success objects are emitted.

Examples

Example 1 Rename the previously selected $session and emit the replacement handle. Assign the output for subsequent operations. View source

Terminal window
$session | LibTmux\Rename-TmuxSession -Name release -PassThru

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux\Rename-TmuxSession.

Guides

task material

Pages that discuss Rename-TmuxSession.

Esc
Search in

Type to search.

Reference previewOpen reference