-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Posh.Host.UI.Box.get/set_ColumnCount ( Fixes #384 )
- Loading branch information
James Brundage
committed
Mar 5, 2024
1 parent
d111f4f
commit c5496fb
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<# | ||
.SYNOPSIS | ||
Gets the number of columns in a box. | ||
.DESCRIPTION | ||
Gets the number of columns in a Posh.Host.UI.Box object. | ||
.NOTES | ||
This script checks if the '.ColumnCount' property is null and adds it as a NoteProperty with a default value of 0 if it is. | ||
It then returns the value of the '.ColumnCount' property. | ||
#> | ||
if ($null -eq $this.'.ColumnCount') { | ||
$this | Add-Member NoteProperty '.ColumnCount' 0 -Force | ||
} | ||
$this.'.ColumnCount' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<# | ||
.SYNOPSIS | ||
Sets the number of columns in a box. | ||
.DESCRIPTION | ||
Sets the number of columns in a Posh.Host.UI.Box object. | ||
#> | ||
param( | ||
[int]$ColumnCount | ||
) | ||
$this | Add-Member NoteProperty '.ColumnCount' $ColumnCount -Force | ||
|