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

Document -Delimiter & -NoTrailingDelimiter parameters for Set-Content/Add-Content cmdlets #11567

Open
2 tasks done
ArmaanMcleod opened this issue Dec 7, 2024 · 0 comments
Open
2 tasks done
Labels
hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release issue-doc-idea Issue - request for new content

Comments

@ArmaanMcleod
Copy link

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Added new parameters to Set-Content/Add-Content cmdlets so a user can specify their own delimiters when writing to files.

We will need to document new parameters -Delimiter and -NoTrailingDelimiter parameters to show new behaviour.

Details

Example 1

Write contents to file using delimiters:

> "a", "b", "c" | Set-Content -Path test.txt -Delimiter ","
> cat ./test.txt
a,b,c,

Example 2

Write contents to file using comma delimiter and remove trailing delimiter:

> "a", "b", "c" | Set-Content -Path test.txt -Delimiter "," -NoTrailingDelimiter
> cat ./test.txt
a,b,c

Articles

  • reference/7.5/Microsoft.PowerShell.Management/Set-Content.md
  • reference/7.5/Microsoft.PowerShell.Management/Add-Content.md

Related Source Pull Requests

Related Source Issues

@ArmaanMcleod ArmaanMcleod added issue-doc-idea Issue - request for new content needs-triage Waiting - Needs triage labels Dec 7, 2024
@sdwheeler sdwheeler added hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release and removed needs-triage Waiting - Needs triage labels Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release issue-doc-idea Issue - request for new content
Projects
None yet
Development

No branches or pull requests

2 participants