Skip to content

Conversation

@gabriel-samfira
Copy link
Member

@gabriel-samfira gabriel-samfira commented Feb 28, 2025

This change adds a new commandlet that returns a helper type which represents a multi-document yaml.

Usage:

PS /> $multiDoc = New-PowershellYamlMultiDocument 
PS /> $multiDoc.Add(@{"hello"="world"})          
PS /> $multiDoc.Add(@{"goodbye"="world"})
PS /> cty $multiDoc
---
hello: world
---
goodbye: world

Or:

PS /> $multiDoc = New-PowershellYamlMultiDocument @(@{"hello"="world"}, @{"goodbye"="world"})
PS /> cty $multiDoc
---
hello: world
---
goodbye: world

Needs tests.

Fixes: #187

CC: @pacorreia

This change adds a new commandlet that returns a helper type which
represents a multi-document yaml.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
@gabriel-samfira gabriel-samfira changed the title Add some multi-document output support [WiP] Add some multi-document output support Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: Multi document output

1 participant