Skip to content

Conversation

@MartinGC94
Copy link
Contributor

@MartinGC94 MartinGC94 commented Oct 1, 2025

PR Summary

This PR adds a Delimiter parameter to Get-Clipboard allowing users to customize the delimiters used to split the content.
This was discussed in this issue: #25480
Note that I made the parameter a string array, rather than string. The reason for this is that it allows users to set a default value of

"`r`n", "`n"

to handle both Windows and Linux line endings. If it was just a single string you'd have to be aware of the line endings before running the command.

PR Context

Fixes #25480

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 2, 2025
@iSazonov
Copy link
Collaborator

iSazonov commented Oct 2, 2025

We could discuss a completer for better UX with values like Default (platform default), WindowsEndOfLine, UnixEndOfLine.

@MartinGC94
Copy link
Contributor Author

@iSazonov I have added a delimiter completer. Where do we want to place these kinds of completers in the solution? Within the project that uses them? Or within the System.Management.Automation project under CommandCompletion? I noticed we already have a "ScopeArgumentCompleter" there but if we want to have a bunch of completer attributes then it might be worth creating a dedicated folder/namespace for that.

@iSazonov
Copy link
Collaborator

iSazonov commented Oct 3, 2025

Where do we want to place these kinds of completers in the solution? Within the project that uses them?

Yes. It is good if we will decouple in-box modules in future.

@iSazonov
Copy link
Collaborator

iSazonov commented Oct 3, 2025

@MartinGC94 Please fix CodeFactor doc issue.

@iSazonov
Copy link
Collaborator

iSazonov commented Oct 3, 2025

/azp run PowerShell-Windows-Packaging-CI, PowerShell-CI-linux-packaging

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Oct 10, 2025
@iSazonov iSazonov merged commit 9c5ac7d into PowerShell:master Oct 15, 2025
36 of 37 checks passed
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Oct 15, 2025
@iSazonov iSazonov self-assigned this Oct 15, 2025
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Oct 15, 2025

📣 Hey @@MartinGC94, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.6.x-Migrated CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Get-Clipboard able to handle any line endings

4 participants