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

LibTmux\Remove-TmuxEnvironment LibTmux\Remove-TmuxEnvironment

Unset an environment entry or keep an explicit removal marker.

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

Description#

By default, forget the entry using tmux set-environment -u. Unsetting a session entry allows a global value to apply to future panes again. MarkRemoved instead uses -r: tmux retains a removal marker to suppress the variable in future pane processes. Neither operation is equivalent to setting an empty string. WhatIf performs no tmux I/O.

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
System.Void

Examples#

Example 1 Prevent future processes in a native $session from inheriting APP_MODE. View source

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

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

Returns

None: No success output.

Esc

Type to search.

Reference preview Open reference