Skip to content

Commit

Permalink
feat: Posh.Host.UI.Box.get/set_ColumnCount ( Fixes #384 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Mar 5, 2024
1 parent c5496fb commit f3bca01
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Posh.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,39 @@ if ($theLine.Length -lt 5) {
}
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>ColumnCount</Name>
<GetScriptBlock>
&lt;#
.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.
#&gt;
if ($null -eq $this.'.ColumnCount') {
$this | Add-Member NoteProperty '.ColumnCount' 0 -Force
}
$this.'.ColumnCount'

</GetScriptBlock>
<SetScriptBlock>
&lt;#
.SYNOPSIS
Sets the number of columns in a box.
.DESCRIPTION
Sets the number of columns in a Posh.Host.UI.Box object.
#&gt;
param(
[int]$ColumnCount
)
$this | Add-Member NoteProperty '.ColumnCount' $ColumnCount -Force


</SetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>LeftWall</Name>
<GetScriptBlock>
Expand Down

0 comments on commit f3bca01

Please sign in to comment.