Posh icon indicating copy to clipboard operation
Posh copied to clipboard

Posh Little Boxes

Open StartAutomating opened this issue 1 year ago • 0 comments

Posh should support terminal boxes/borders around content.

These can be simply expressed in a string, and the spaces in that string can be used to content placement.

  • [ ] #335
$Posh.Host.UI.Boxes # should return the known boxes
  • [ ] #336
  • [ ] #337

Boxes should be defined in NoteProperties of Posh.Host.UI.Boxes.

Boxes should normally be defined by a simple string.

For example, a "box" could be made out of "*"

$Posh.Host.UI.Boxes.Add("Star", '*')

A box could also be provided by a grid of characters, for example:

$Posh.Host.UI.Boxes.Add("PipeDash", @'
|-|
| |
|-|
'@)

The blank spacing in this box could be filled with content, and the characters bracketing that blank space can be extended.

This logic gets even more interesting if the box definition is a 5x5 matrix:

$Posh.Host.UI.Boxes.Add("Double", @'
╔═╦═╗
║ ║ ║
╠═╬═║
║ ║ ║
╚═╩═╝
'@)

Essentially, can define what all types of intersection should look like within a box, we can extend that box infinitely.

There should be several of these built-in boxes.

  • [ ] #355

After several have been defined, we should start work on the Box pseudotype:

  • [ ] #372

StartAutomating avatar Feb 22 '24 21:02 StartAutomating