TerminalBlocks

1.2.0

PowerShell Native Prompt Blocks

Minimum PowerShell version

5.1.0

There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name TerminalBlocks -RequiredVersion 1.2.0

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name TerminalBlocks -Version 1.2.0

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2022 Joel Bennett. All rights reserved.

Package Details

Author(s)

  • Joel Bennett

Tags

Prompt ANSI VirtualTerminal EzTheme

Functions

Exit-Prompt Initialize-Prompt New-TerminalBlock Show-AzureContext Show-Date Show-DockerContext Show-ElapsedTime Show-ErrorCount Show-HistoryId Show-KubeContext Show-LastExitCode Show-Path Show-PoshGitStatus Test-Elevation Test-Success

Dependencies

Release Notes


       ## 1.2.0

       1. Add support for separate cap backgrounds, so you can match the blocks on both ends
           E.g. if each work is a block, when bar has caps on both sides: <foo<bar>baz>.
           Requires calling .ToString(true, leftBackground, rightBackground)
       2. Fix bug in caching of SpecialBlock objects

       ## 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.TerminalBlock]::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

Version History

Version Downloads Last updated
2.0.0-simpli... 23 9/13/2023
1.2.0 (current version) 206 4/17/2023
1.1.1 9 4/16/2023
1.0.3 121 11/1/2022
1.0.2 14 10/18/2022
1.0.1 45 8/11/2022
1.0.0 11 8/11/2022
1.0.0-caps0012 17 7/18/2022
Show more