Copying text from CLI #8389

Closed
opened 2026-01-31 01:28:09 +00:00 by claunia · 6 comments
Owner

Originally created by @nistre on GitHub (May 21, 2020).

Description of the new feature/enhancement

In the standard cmd and PowerShell there is the ability after highlighting (marking) text in the window then by pressing one could copy text from the CLI. In the new Terminal, not saying it has to be the same process as before but also or Ctrl+C after marking does not allow the user to copy text and there should be some way to accomplish this. If there is a way to copy text I am not aware of it.

Originally created by @nistre on GitHub (May 21, 2020). # Description of the new feature/enhancement In the standard cmd and PowerShell there is the ability after highlighting (marking) text in the window then by pressing <Enter> one could copy text from the CLI. In the new Terminal, not saying it has to be the same process as before but also <Right-Clicking> or Ctrl+C after marking does not allow the user to copy text and there should be some way to accomplish this. If there is a way to copy text I am not aware of it.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 01:28:10 +00:00
Author
Owner

@DHowett commented on GitHub (May 21, 2020):

Terminal allows you to select text with the mouse and copy it to the clipboard using the mouse or the keyboard. You can then paste it with the mouse or the keyboard.

If you're using OpenSSH 7.7 with vim or tmux, that software is suppressing text selection in the Terminal and not giving you any of the benefits commensurate with it doing so.

@DHowett commented on GitHub (May 21, 2020): Terminal allows you to select text with the mouse and copy it to the clipboard using the mouse or the keyboard. You can then paste it with the mouse or the keyboard. If you're using OpenSSH 7.7 with vim or tmux, that software is suppressing text selection in the Terminal and not giving you any of the benefits commensurate with it doing so.
Author
Owner

@DHowett commented on GitHub (May 21, 2020):

(If that's the case, try holding down Shift while clicking and dragging.)

@DHowett commented on GitHub (May 21, 2020): (If that's the case, try holding down <kbd>Shift</kbd> while clicking and dragging.)
Author
Owner

@nistre commented on GitHub (May 21, 2020):

@DHowett can you specify how to use the mouse and keyboard to do this? I am able to highlight (mark) like I said in the initial post. While text is highlighted I have tried the following things to copy the text:

  1. Pressing the Enter key, this results in running the current command or adding a new line to the CLI and does not copy the text that was highlighted.
  2. Pressing Ctrl+C, the exact same result as when pressing Enter
  3. Pressing Right-Click, removes the highlight without copying the text and without a context menu to select copy text

EDIT: I'm running Version: 1.0.1401.0 If that matters

@nistre commented on GitHub (May 21, 2020): @DHowett can you specify how to use the mouse and keyboard to do this? I am able to highlight (mark) like I said in the initial post. While text is highlighted I have tried the following things to copy the text: 1. Pressing the Enter key, this results in running the current command or adding a new line to the CLI and does not copy the text that was highlighted. 2. Pressing Ctrl+C, the exact same result as when pressing Enter 3. Pressing Right-Click, removes the highlight without copying the text and without a context menu to select copy text EDIT: I'm running Version: 1.0.1401.0 If that matters
Author
Owner

@DHowett commented on GitHub (May 21, 2020):

Sure. Some of this depends on the settings you are using.

Select text.

To copy with the mouse: Right-click.
We don't have a context menu today, but there's a workitem tracking implementing one.

To copy with the keyboard:
By default: Ctrl+Shift+C and Ctrl+C are both bound t copy. This only applies if you're using a settings file generated after version 0.11.
If you are using a settings file generated before 0.11(*) (you'll know because there's no version stamp in the file), the default is Ctrl+Shift+C alone.

You can configure what exact keyboard keys affect copy; check out the keybinding docs for more.

(*): We changed the default, but didn't want to force it on our existing users during the preview.

@DHowett commented on GitHub (May 21, 2020): Sure. Some of this depends on the settings you are using. Select text. To copy with the mouse: Right-click. We don't have a context menu today, but there's a workitem tracking implementing one. To copy with the keyboard: **By default**: <kbd>Ctrl+Shift+C</kbd> and <kbd>Ctrl+C</kbd> are both bound t copy. This only applies if you're using a settings file generated after version 0.11. If you are using a settings file generated before 0.11(*) (you'll know because there's no version stamp in the file), the default is <kbd>Ctrl+Shift+C</kbd> alone. You can configure what exact keyboard keys affect copy; check out [the keybinding docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/key-bindings) for more. (*): We changed the default, but didn't want to force it on our existing users during the preview.
Author
Owner

@nistre commented on GitHub (May 22, 2020):

Thank you. I had to completely remove my older version and reinstall to get the new settings file. I expected the settings file to get updated through the update process I guess.

@nistre commented on GitHub (May 22, 2020): Thank you. I had to completely remove my older version and reinstall to get the new settings file. I expected the settings file to get updated through the update process I guess.
Author
Owner

@DHowett commented on GitHub (May 22, 2020):

Sorry about that. We decided at some point (0.5!) that user settings were held dear and that we wouldn't rewrite them until we had our first after-v1 settings changes that required migration.

@DHowett commented on GitHub (May 22, 2020): Sorry about that. We decided at some point (0.5!) that user settings were _held dear_ and that we wouldn't rewrite them until we had our first after-v1 settings changes that required migration.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8389