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.

cmdlet libtmux-powershell latest

LibTmux.Get-TmuxEnvironment

Read native tmux environment entries.

Source and package
Qualified name
LibTmux\Get-TmuxEnvironment
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.

tmux command#

The tmux commands behind Get-TmuxEnvironment.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference