Selecting text in the command-line, à la Warp #6916
Replies: 5 comments 9 replies
-
|
As an aside: Ghostty may need to step in and add selection itself, as some shells (such as Bash) do not support selecting text. Apart from that, this feature is likely entirely rooted in shell integration, unless a Warp-style input panel were to be considered. Also, some shells (such as Fish) may need little to no changes to facilitate this feature. |
Beta Was this translation helpful? Give feedback.
-
|
One other thing to consider is whether this change would break users of the Vi and Emacs bindings of their shell. A potential solution is to make this configurable, so that users can choose to disable it were it to interfere with something of theirs. These bindings should also not override custom bindings of the user's at the shell level. Care should also be taken to ensure that these bindings, were they to be done at the Ghostty level rather than the shell level, do not affect any programs apart from the shell when at the prompt. |
Beta Was this translation helpful? Give feedback.
-
|
For what is worth, the Windows Terminal does this well, in my opinion. On the Windows Terminal, you press Ctrl+Shift+m to enter selection mode (though I don't remember if they call it that). Then the cursor changes. At this point you can move it with the arrow keys. To select, you press and hold Shift and move with the arrows. To go back to normal, you can just press Enter. I don't think this conflicts with vi or Emacs type bindings. |
Beta Was this translation helpful? Give feedback.
-
|
Can someone explain (like I'm five) why this is difficult? I'm sure it's something I fundamentally don't understand about terminals.. or is it just about depriving the input from the shell? I.e. if the terminal captures shift+left to initiate selection, it might break shell applications? Is regular cursor movement handled by the shell? |
Beta Was this translation helpful? Give feedback.
-
|
It's just not selection that Warp offers, it's an entire editing experience - just clicking in place to put the cursor in place, selection, deletion, editing just like you would any other text in MacOS. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be splendid if one could bind shift+arrow to select or extend text in the current command-line/prompt, similar to what is possible in the Warp terminal.
Originally #3142; see that for more discussion and workarounds.
See also: #6917, for selecting text in the scrollback, as opposed to the command-line.
Beta Was this translation helpful? Give feedback.
All reactions