Core LibraryAPI Reference

Choose documentation 2

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

cmdlet libtmux-powershell latest

LibTmux.Get-TmuxEnvironment

LibTmux\Get-TmuxEnvironment LibTmux\Get-TmuxEnvironment

Read native tmux environment entries.

Source and package
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/GetTmuxEnvironmentCommand.cs
Server (default): Get-TmuxEnvironment [-Server] <LibTmux.Server> [-Name <System.String>] [<CommonParameters>] Session: Get-TmuxEnvironment [-Session] <LibTmux.Session> [-Name <System.String>] [<CommonParameters>]

Description#

Emit native TmuxEnvironmentEntry objects with Name, Value and IsRemoved . An empty value is present. A removal marker has IsRemoved true and Value null; an absent or hidden variable emits no object. Hidden variables remain available to tmux formats and are excluded from new child process environments. Omit Name to list the table.

Notes

A Server selects the global environment; a Session selects its local environment. Reads do not merge those tables. Changes affect newly created processes and do not rewrite the environment of an existing pane process. Empty owner pipelines do no I/O. Errors retain the original exception and owner; Continue permits later owners and Stop terminates. Cancellation cannot undo a dispatched mutation.

Command details#

Command type
cmdlet
Default parameter set
Server
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server : A native server owner.; LibTmux.Session : A native session owner.
Outputs
LibTmux.TmuxEnvironmentEntry

Examples#

Example 1 Read a previously stored variable from a native $session . View source

Terminal window
$session | LibTmux\Get-TmuxEnvironment -Name 'APP_MODE'
Parameters
Common parameters 12

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

Returns

LibTmux.TmuxEnvironmentEntry : One native entry per visible variable or removal marker.

Esc

Type to search.

Reference preview Open reference