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.Set-TmuxEnvironment

Set a tmux environment variable for future processes or formats.

Source and package
Qualified name
LibTmux\Set-TmuxEnvironment
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SetTmuxEnvironmentCommand.cs

Description

An empty string sets a present, empty value. ExpandFormats expands tmux formats before storage. Hidden keeps the variable for tmux formats and excludes it from new child process environments and ordinary reads. With Hidden and PassThru, the native readback entry has Value null and IsRemoved false; this does not mean an empty or removed variable. Without PassThru, emit no success output. WhatIf does not contact tmux.

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
Confirmation
Supports -WhatIf and -Confirm; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Server: A native server owner.; LibTmux.Session: A native session owner.
Outputs
LibTmux.TmuxEnvironmentEntry
Parameters
Common parameters 12

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

Returns

LibTmux.TmuxEnvironmentEntry: The native readback entry, only with PassThru.

Examples

Example 1 Set a value for future processes in a native $session and inspect its readback. View source

Terminal window
$session |
LibTmux\Set-TmuxEnvironment -Name 'APP_MODE' -Value 'development' -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\Set-TmuxEnvironment.

tmux command

task material

The tmux commands behind Set-TmuxEnvironment.

tmux C API

task material

The C declarations in tmux that implement these commands.

Esc
Search in

Type to search.

Reference previewOpen reference