mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add Dim and DimOff to $PSStyle (#18653)
This commit is contained in:
+2
@@ -2027,6 +2027,8 @@ namespace System.Management.Automation.Runspaces
|
||||
.AddItemScriptBlock(@"""$($_.Blink)$($_.Blink.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Blink")
|
||||
.AddItemScriptBlock(@"""$($_.BoldOff)$($_.BoldOff.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "BoldOff")
|
||||
.AddItemScriptBlock(@"""$($_.Bold)$($_.Bold.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Bold")
|
||||
.AddItemScriptBlock(@"""$($_.DimOff)$($_.DimOff.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "DimOff")
|
||||
.AddItemScriptBlock(@"""$($_.Dim)$($_.Dim.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Dim")
|
||||
.AddItemScriptBlock(@"""$($_.Hidden)$($_.Hidden.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Hidden")
|
||||
.AddItemScriptBlock(@"""$($_.HiddenOff)$($_.HiddenOff.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "HiddenOff")
|
||||
.AddItemScriptBlock(@"""$($_.Reverse)$($_.Reverse.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Reverse")
|
||||
|
||||
@@ -652,6 +652,16 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
public string Bold { get; } = "\x1b[1m";
|
||||
|
||||
/// <summary>
|
||||
/// Gets value to turn off dim.
|
||||
/// </summary>
|
||||
public string DimOff { get; } = "\x1b[22m";
|
||||
|
||||
/// <summary>
|
||||
/// Gets value to turn on dim.
|
||||
/// </summary>
|
||||
public string Dim { get; } = "\x1b[2m";
|
||||
|
||||
/// <summary>
|
||||
/// Gets value to turn on hidden.
|
||||
/// </summary>
|
||||
|
||||
@@ -9,6 +9,8 @@ Describe 'Tests for $PSStyle automatic variable' -Tag 'CI' {
|
||||
Blink = "`e[5m"
|
||||
BoldOff = "`e[22m"
|
||||
Bold = "`e[1m"
|
||||
DimOff = "`e[22m"
|
||||
Dim = "`e[2m"
|
||||
HiddenOff = "`e[28m"
|
||||
Hidden = "`e[8m"
|
||||
ReverseOff = "`e[27m"
|
||||
@@ -225,6 +227,8 @@ Describe 'Tests for $PSStyle automatic variable' -Tag 'CI' {
|
||||
@{ Submember = 'Blink' }
|
||||
@{ Submember = 'BoldOff' }
|
||||
@{ Submember = 'Bold' }
|
||||
@{ Submember = 'DimOff' }
|
||||
@{ Submember = 'Dim' }
|
||||
@{ Submember = 'HiddenOff' }
|
||||
@{ Submember = 'Hidden' }
|
||||
@{ Submember = 'ItalicOff' }
|
||||
|
||||
Reference in New Issue
Block a user