Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WiP] Add some multi-document output support #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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