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

Add -PassThru parameter to Set-Clipboard #13713

Merged
merged 3 commits into from
Jul 22, 2021

Conversation

ThomasNieto
Copy link
Contributor

@ThomasNieto ThomasNieto commented Sep 29, 2020

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

@ghost ghost assigned TravisEz13 Sep 29, 2020
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Sep 30, 2020
@ThomasNieto
Copy link
Contributor Author

ThomasNieto commented Oct 2, 2020

@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

ghost commented Oct 16, 2020

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 SteveL-MSFT added the Review - Committee The PR/Issue needs a review from the PowerShell Committee label Dec 15, 2020
@SteveL-MSFT
Copy link
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
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 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

ghost commented Jan 14, 2021

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

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

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
Member

I fixed the merge conflict and added -Append test cases

@iSazonov
Copy link
Collaborator

@SteveL-MSFT Ready to merge?

@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Jul 22, 2021

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

@TravisEz13 TravisEz13 changed the title Add PassThru parameter to Set-Clipboard Add -PassThru parameter to Set-Clipboard Jul 22, 2021
@TravisEz13 TravisEz13 merged commit 7777afc into PowerShell:master Jul 22, 2021
@iSazonov 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 iSazonov added this to the 7.2.0-preview.8 milestone Jul 22, 2021
@iSazonov
Copy link
Collaborator

@ThomasNieto Thanks for you contribution!

xtqqczze pushed a commit to xtqqczze/PowerShell that referenced this pull request Jul 27, 2021
@ghost
Copy link

ghost commented Aug 23, 2021

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

Handy links:

@ghost
Copy link

ghost commented Sep 28, 2021

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

Handy links:

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