Copy into single line invalid #7333

Closed
opened 2026-01-31 01:01:17 +00:00 by claunia · 4 comments
Owner

Originally created by @hyahm on GitHub (Apr 8, 2020).

Ubuntu terminal

"keybindings": [
        { "command": { "action": "copy", "argument": true }, "keys": ["ctrl+shift+c"] }
    ]

It was good when I first opened the terminal, but when I log in to the server remotely, the copy will be in multiple lines, and it will be the same when I log out. I need to close the terminal and reopen it.

Originally created by @hyahm on GitHub (Apr 8, 2020). Ubuntu terminal ``` "keybindings": [ { "command": { "action": "copy", "argument": true }, "keys": ["ctrl+shift+c"] } ] ``` It was good when I first opened the terminal, but when I log in to the server remotely, the copy will be in multiple lines, and it will be the same when I log out. I need to close the terminal and reopen it.
Author
Owner

@zadjii-msft commented on GitHub (Apr 8, 2020):

  • What is the purpose of "argument": true in your copy keybinding? I'm pretty sure that's not going to do anything...
  • Is this possibly #5113?
@zadjii-msft commented on GitHub (Apr 8, 2020): * What is the purpose of `"argument": true` in your copy keybinding? I'm pretty sure that's not going to do anything... * Is this possibly #5113?
Author
Owner

@hyahm commented on GitHub (Apr 9, 2020):

Reference for https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md

@hyahm commented on GitHub (Apr 9, 2020): Reference for https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
Author
Owner

@zadjii-msft commented on GitHub (Apr 9, 2020):

Okay yea, but that was more exemplary of how arguments are provided in general. None of the keybindings actually take a parameter named "argument" 😆

Command Command Description Action (*=required) Action Arguments Argument Descriptions
copy Copy the selected terminal content to your Windows Clipboard. singleLine boolean When true, the copied content will be copied as a single line. When false, newlines persist from the selected text.

So you probably want

{ "command": { "action": "copy", "singleLine ": true }, "keys": ["ctrl+shift+c"] }

Though, I believe we only changed the name of that parameter in the unreleased 0.11 builds. I think before that it was named "trimWhitespace". (it was changed here)

@zadjii-msft commented on GitHub (Apr 9, 2020): Okay yea, but that was more exemplary of how arguments are provided _in general_. None of the keybindings actually take a parameter named "argument" 😆 Command | Command Description | Action (*=required) | Action Arguments | Argument Descriptions -- | -- | -- | -- | -- copy | Copy the selected terminal content to your Windows Clipboard. | singleLine | boolean | When true, the copied content will be copied as a single line. When false, newlines persist from the selected text. So you probably want ```json { "command": { "action": "copy", "singleLine ": true }, "keys": ["ctrl+shift+c"] } ``` Though, I believe we only changed the name of that parameter in the unreleased 0.11 builds. I think before that it was named "trimWhitespace". (it was changed [here](https://github.com/microsoft/terminal/commit/084b48a751d7152c8f15be2521fc866ccbed1fbb#diff-a55c637c1b0ca7d0112d97b3a9f9c3ee))
Author
Owner

@ghost commented on GitHub (Apr 13, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Apr 13, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7333