Skip to content

Please add a "remove leading and trailing whitespace setting" when copying a single line of text #15290

Open
@zadjii-msft

Description

promoted from MSFT:43799361

Frequently I use "git branch" to list out branches, and then triple click on one of them to highlight it, and then right-click to copy it. I then do "git checkout" followed by Ctrl+V to checkout this branch.

When I do this, there's always whitespace at the front of the branch name that was copied.

This is just one concrete example, but this happens all the time. When copying a single line of text it is very rare that the user is trying top copy the entire line of output as-is.

Can you please add a setting that removes leading whitespace when copying. It should apply only to single-line copies.

We could probably add a "trimWhitespace": "none" | "trailing" | "leading" | "all" param to copy. That seems kinda sensible. The equal of the paste property.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalArea-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions