Skip to content

Commit 242bb2b

Browse files
Change FancyBool to use plus by default
1 parent ec488e0 commit 242bb2b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

module/ClassExplorer.psm1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ if (-not $PSVersionTable.PSEdition -or $PSVersionTable.PSEdition -eq 'Desktop')
44
Import-Module "$PSScriptRoot/bin/Core/ClassExplorer.dll"
55
}
66

7+
if (-not $env:CLASS_EXPLORER_TRUE_CHARACTER) {
8+
$env:CLASS_EXPLORER_TRUE_CHARACTER = '+'
9+
}
10+
711
Update-FormatData -PrependPath $PSScriptRoot\ClassExplorer.format.ps1xml
812
Update-TypeData -PrependPath $PSScriptRoot\ClassExplorer.types.ps1xml -ErrorAction Ignore
913

src/ClassExplorer/Internal/_Format.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ public static string FancyBool(bool value, int maxLength = -1)
184184
{
185185
if (value)
186186
{
187-
return Success("\u2713", maxLength);
187+
return Success(
188+
Environment.GetEnvironmentVariable("CLASS_EXPLORER_TRUE_CHARACTER") ?? "+",
189+
maxLength);
188190
}
189191

190192
return Failure("x", maxLength);

0 commit comments

Comments
 (0)