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] <Lib
Tmux > -Name <System.Server .String > [-MarkRemoved ] [-WhatIf ] [-Confirm] [<CommonParameters >] Session: Remove-TmuxEnvironment [-Session] <LibTmux > -Name <System.Session .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.
WhatIfperforms no tmux I/O.Notes
A
Serverselects the global environment; aSessionselects 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
-WhatIfand-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
$sessionfrom inheriting APP_MODE. View sourceTerminal window $session | LibTmux\Remove-TmuxEnvironment -Name 'APP_MODE' -MarkRemoved- Parameters
-
-
-Server(LibTmux ) (for.Server Server) #The native server whose table is used.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
The environment variable name. Omit Name on Get to list this table. Whitespace-only names and NUL are rejected.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()- Validation
ValidatePattern("\\A[^\\x00]*[^\\s\\x00][^\\x00]*\\z")
-
-MarkRemoved(System.Management ) #.Automation .Switch Parameter Keep a removal marker to suppress inherited values in new child processes instead of forgetting the entry.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Show the selected owner, scope and operation without contacting tmux.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Ask for confirmation before changing the selected table.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
cf
-
-Session(LibTmux ) (for.Session Session) #The native session whose table is used.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ) #.Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ) #.Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ) #.Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ) #.Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ) #.Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ) #.Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String ) #Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String ) #Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String ) #Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
-OutVariable(System.String ) #Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String ) #Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- Returns
-
None: No success output.