Skip to content

Commit

Permalink
feat: Posh.Host.UI.Box.MiddleRight ( Fixes #366 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Feb 25, 2024
1 parent 3fadc8f commit 8b3b645
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Posh.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,25 @@ $theLine.Substring(0,1)



</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>MiddleRight</Name>
<GetScriptBlock>
&lt;#
.SYNOPSIS
Gets a box's Middle Right character
.DESCRIPTION
Gets the Middle Right character in a box
#&gt;
$theseLines = @($this -split '[\r\n]+' -ne '')

if (-not $theseLines) { return }
$theLine = $theseLines[[Math]::Floor($theseLines.Length/2)]
$theLine.Substring($theLine.Length - 1)



</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
Expand Down

0 comments on commit 8b3b645

Please sign in to comment.