8000 Add Delimiter parameter to Get-Clipboard by MartinGC94 · Pull Request #26134 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

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

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
Copy link
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Get-Clipboard able to handle any line endings

2 participants

0