You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit triple-click selection to command field only #9881
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:
I can't think of many (any?) situations where I'd want to include the prompt when selecting or copying a line.
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
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.
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
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
Activity
LuanVSO commentedon Apr 18, 2021
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
KalleOlaviNiemitalo commentedon Apr 19, 2021
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.
zadjii-msft commentedon Apr 19, 2021
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
zadjii-msft commentedon Jul 20, 2023
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