Skip to content

Limit triple-click selection to command field only #9881

Open

Description

Description of the new feature/enhancement

Currently, Ctrl+A will select the entire command/text input, however, triple clicking (mouse version of Select All selects the entire line (including the prompt). GIF shows selecting with mouse vs with keyboard:

terminal

I can't think of many (any?) situations where I'd want to include the prompt when selecting or copying a line.

Proposed technical implementation details (optional)

I would like the triple click action to align to the Ctrl+A selection method. Thanks!

Activity

  1. added
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on Apr 18, 2021
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 18, 2021
  3. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 18, 2021
  4. LuanVSO commented on Apr 18, 2021

    @LuanVSO
    Contributor

    the ctrl+a selection is handled by PowerShell while the triple click is handed by terminal.
    there's no way for terminal to have the same behavior because it doesn't know where the prompt is or even if there is a prompt in the screen

  5. KalleOlaviNiemitalo commented on Apr 19, 2021

    @KalleOlaviNiemitalo

    Shells could be configured to emit FTCS_COMMAND_START from Proprietary Escape Codes of iTerm2, and Windows Terminal could then use that to avoid selecting the prompt. The same marking of prompts would be used in #6232.

    I think cmd.exe and PowerShell already let users embed ESC characters in prompts, so these shells would not have to be changed. Not so sure about Windows PowerShell though.

  6. zadjii-msft commented on Apr 19, 2021

    @zadjii-msft
    Member

    Huh. Okay, the FTCS_COMMAND_START solution is clever. This would then also require #1553, and some way of setting triple click to "select the whole line up to the prompt (if one exists)". So I guess I'll toss this in on #1553

  7. added
    Area-InputRelated to input processing (key presses, mouse, etc.)
    Area-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.
    and removed
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on Apr 19, 2021
  8. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 19, 2021
  9. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 29, 2021
  10. zadjii-msft commented on Jul 20, 2023

    @zadjii-msft
    Member

    I am TEMPTED to axe this, in favor of the experimental.rightClickContextMenu (#3337, #14775) and shell integration + the "select command" entries added in #15020.

    That's not triple click, it's rightclick, move, left click, but still

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-InputRelated to input processing (key presses, mouse, etc.)Area-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