Skip to content

Add -PassThru parameter to Set-Clipboard - #13713

Merged
Travis Plunk (TravisEz13) merged 3 commits into
PowerShell:masterfrom
ThomasNieto:set_content_passthru
Jul 22, 2021
Merged

Travis Plunk (TravisEz13) merged 3 commits into
PowerShell:masterfrom
ThomasNieto:set_content_passthru

Conversation

@ThomasNieto

@ThomasNieto Thomas Nieto (ThomasNieto) commented Sep 29, 2020 •

Copy link
Copy Markdown
Contributor

PR Summary

Adds a -PassThru parameter to Set-Clipboard.

PS C:\> 'hello' | Set-Clipboard -PassThru
hello
PS C:\> 'hello', 'world' | Set-Clipboard -PassThru
hello
world

PR Context

Resolves #13711

PR Checklist

@ThomasNieto

Thomas Nieto (ThomasNieto) commented Oct 2, 2020 •

Copy link
Copy Markdown
Contributor Author

Steve Lee (@SteveL-MSFT) any chance we could squeeze this one in 7.1 since its such a small change? 😄

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Oct 2, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Oct 16, 2020
@ghost

Copy link
Copy Markdown

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

@SteveL-MSFT Steve Lee (SteveL-MSFT) added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Dec 15, 2020
@SteveL-MSFT

Copy link
Copy Markdown
Member

@PowerShell/powershell-committee discussed this and would like to understand a real world scenario usage of this to determine the right behavior or whether we even want to add this

@ghost ghost removed the Review - Needed The PR is being reviewed label Dec 16, 2020
@SteveL-MSFT

Copy link
Copy Markdown
Member

@PowerShell/powershell-committee discussed this again, we agreed that most users expect -PassThru to act like tee in that the intent is to pass input into Set-Clipboard and subsequently pass the original input into something else further down the pipeline (not the transformed result). In addition, it would seem more useful in most cases to get the original object than the stringified version which can be retrieved via Get-Clipboard for that use case. The semantics should not change with -Append. The -Append only affects the clipboard and not what is passed through.

@SteveL-MSFT Steve Lee (SteveL-MSFT) added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Jan 6, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Jan 14, 2021
@ghost

Copy link
Copy Markdown

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

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if a test case can be added for -Append (or perhaps just make it a test case for the single and multiple objects tests, then I'm good with this PR.

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Review - Needed The PR is being reviewed labels Jul 14, 2021
@SteveL-MSFT

Copy link
Copy Markdown
Member

I fixed the merge conflict and added -Append test cases

@iSazonov

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT) Ready to merge?

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Jul 22, 2021 •

Copy link
Copy Markdown
Member

Yes, this one is ready. Travis Plunk (@TravisEz13)'s concern was addressed, but I'll ask Travis Plunk (@TravisEz13) to merge since it's assigned to him

@TravisEz13 Travis Plunk (TravisEz13) changed the title Add PassThru parameter to Set-Clipboard Add -PassThru parameter to Set-Clipboard Jul 22, 2021
@TravisEz13
Travis Plunk (TravisEz13) merged commit 7777afc into PowerShell:master Jul 22, 2021
@iSazonov Ilya (iSazonov) removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 22, 2021
@iSazonov Ilya (iSazonov) added this to the 7.2.0-preview.8 milestone Jul 22, 2021
@iSazonov

Copy link
Copy Markdown
Collaborator

Thomas Nieto (@ThomasNieto) Thanks for you contribution!

@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.9 has been released which incorporates this pull request.:tada:

Handy links:

@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.10 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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 Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Passthru option on Set-Clipboard

4 participants