TerminalBlocks
2.0.0-simplify0038
PowerShell Native Prompt Blocks
Minimum PowerShell version
5.1.0
See the version list below for details.
Installation Options
Owners
Copyright
(c) 2022 Joel Bennett. All rights reserved.
Package Details
Author(s)
- Joel Bennett
Tags
Prompt ANSI VirtualTerminal EzTheme
Functions
Get-TerminalBlockDefault New-TerminalBlock Reset-LastExitCode Set-TerminalBlockDefault Show-AzureContext Show-CondaContext Show-CPUName Show-Date Show-DockerContext Show-ElapsedTime Show-ErrorCount Show-ExoNamespace Show-GPUName Show-HistoryId Show-HostName Show-JobOutput Show-KubeContext Show-LastExitCode Show-LocationStack Show-Memory Show-NestedPromptLevel Show-Newline Show-OSTheme Show-Palette Show-Path Show-PoshGitStatus Show-Space Show-UserName Show-Version Show-Weather Test-Elevation Test-Success
Dependencies
-
- Configuration (>= 1.5.1)
- Metadata (>= 1.5.7)
- Pansies (>= 2.9.0)
Release Notes
TerminalBlocks v2.0.0-simplify0038+Build.local.Sha.de924b9c89c8fca7dcd882a51ceac9f79e58e6dd.Date.20250428T034049
## 2.0.0
- New blocks: HostName, UserName, Version, ExONamespace, CondaContext, LocationStack, JobOutput
- New features in blocks: Date (UTC), KubeContext (Namespace),
- Throw out the idea of using right-aligned blocks.
- Improve serialization to make this work better with PowerLine and EzTheme
- Better Prompt Examples
## 1.2.0
Add support for separate cap backgrounds, so you can match the blocks on both ends of "bar" when bar has caps on both sides: <foo<bar>baz>. Requires calling .ToString(true, leftBackground, rightBackground)
## 1.1.0
The major feature in this release is the ability to detect (and show) errors.
1. Add Capture errors by caching .GetPowerShell() and calling .Invoke() on it
2. Add HadErrors and Streams to TerminalBlocks so you can access that.
### In addition, there are a couple new commands to expose static properties
3. Add Test-Elevation - true if PowerShell is elevated
4. Add Test-Success - returns [PoshCode.TerminalBlocks.Block]::LastSuccess...
Note that you _must_ set this in your prompt function, or it will always be $true
5. Fix encoding bug in Show-ElapsedTime in Windows PowerShell
FileList
- TerminalBlocks.nuspec
- SessionState.ps1
- TerminalBlocks.format.ps1xml
- TerminalBlocks.psd1
- TerminalBlocks.psm1
- examples\EmojiPrompt.ps1
- examples\Fetch.ps1
- examples\logo.png
- examples\PowerLinePrompt.ps1
- lib\TerminalBlocks.deps.json
- lib\TerminalBlocks.dll
Version History
Version | Downloads | Last updated |
---|---|---|
2.0.0-simpli... | 3 | 5/12/2025 |
2.0.0-simpli... (current version) | 3 | 5/12/2025 |
2.0.0-simpli... | 43 | 9/13/2023 |
1.2.0 | 1,097 | 4/17/2023 |
1.1.1 | 17 | 4/16/2023 |
1.0.3 | 122 | 11/1/2022 |
1.0.2 | 15 | 10/18/2022 |
1.0.1 | 46 | 8/11/2022 |
1.0.0 | 12 | 8/11/2022 |
1.0.0-caps0012 | 18 | 7/18/2022 |