Skip to content

Is there a way to copy PowerShell buffer using one of Windows Terminal actions? #15349

Closed Answered by zadjii-msft
gaberiel44 asked this question in Q&A
Discussion options

You must be logged in to vote

"This copies the selected terminal content to your clipboard" I think "terminal content" is meant as the terminal output, NOT the buffer.

Here's a trick: the terminal doesn't actually know the difference between "output" and "input" in the buffer 😉

So that's me using Windows Terminal's built-in ctrl+c "Copy" action. If there's a selection, it'll copy and dismiss the selection. If there's no selection, it'll just send a ^C to the connected client app.

In Notepad, if there is a selection, pressing Ctrl+C, the text will be copied to the clipboard, otherwise nothing happens. This is the same in other edit boxes and controls
...
I would like Terminal/PowerShell to behave exactly like Notepad

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zadjii-msft
Comment options

Answer selected by zadjii-msft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants