Allow selecting text #672

Closed
opened 2026-02-16 17:27:50 -05:00 by yindo · 12 comments
Owner

Originally created by @KTibow on GitHub (Jul 12, 2025).

Originally assigned to: @adamdotdevin on GitHub.

When using opencode, you lose the ability to select text. You have the default cursor instead of the text cursor, and dragging does nothing. Allow selecting text either by default or upon a command to allow copying out prompts, outputs, and errors more ergonomically.

Originally created by @KTibow on GitHub (Jul 12, 2025). Originally assigned to: @adamdotdevin on GitHub. When using opencode, you lose the ability to select text. You have the `default` cursor instead of the `text` cursor, and dragging does nothing. Allow selecting text either by default or upon a command to allow copying out prompts, outputs, and errors more ergonomically.
yindo closed this issue 2026-02-16 17:27:50 -05:00
Author
Owner

@markjaquith commented on GitHub (Jul 13, 2025):

Just a tip: in many terminal emulators, there's a key you can hold down to enable selection. In Ghostty, it's shift.

@markjaquith commented on GitHub (Jul 13, 2025): Just a tip: in many terminal emulators, there's a key you can hold down to enable selection. In Ghostty, it's `shift`.
Author
Owner

@KTibow commented on GitHub (Jul 13, 2025):

I can confirm shift+drag works. Ideally it would be either explained or not required.

@KTibow commented on GitHub (Jul 13, 2025): I can confirm shift+drag works. Ideally it would be either explained or not required.
Author
Owner

@johnpyp commented on GitHub (Jul 13, 2025):

Agree: The issue with the shift-drag method is that it'll copy everything including UI elements, and not understanding or respecting line breaks or anything like that.

Comparatively, if I select multiple lines of wrapping text in tmux that's just in zsh (without shift), it'll understand which text is wrapping and which isn't, making it copy nearly as seamlessly as copying from a webpage.

@johnpyp commented on GitHub (Jul 13, 2025): Agree: The issue with the shift-drag method is that it'll copy *everything* including UI elements, and not understanding or respecting line breaks or anything like that. Comparatively, if I select multiple lines of wrapping text in tmux that's just in zsh (without shift), it'll understand which text is wrapping and which isn't, making it copy nearly as seamlessly as copying from a webpage.
Author
Owner

@Regboy744 commented on GitHub (Jul 14, 2025):

Does anyone figure out how to select the text to copy an specific part of the response ? I have the same problem when I select the text with shift it copies everything, including UI elements.

@Regboy744 commented on GitHub (Jul 14, 2025): Does anyone figure out how to select the text to copy an specific part of the response ? I have the same problem when I select the text with shift it copies everything, including UI elements.
Author
Owner

@KTibow commented on GitHub (Jul 14, 2025):

copy everything including UI elements

Does anyone figure out how to select the text to copy an specific part of the response

Current workarounds:

  • paste the text into a text editor to edit out the UI elements
  • if it's not an error, make a share link and open it in the browser

Other agent CLIs also have this problem. Only automatic fix I could think of is watching the clipboard and, if it corresponds with a part of the opencode UI, editing the clipboard to remove the UI elements.

@KTibow commented on GitHub (Jul 14, 2025): > copy *everything* including UI elements > Does anyone figure out how to select the text to copy an specific part of the response Current workarounds: - paste the text into a text editor to edit out the UI elements - if it's not an error, make a share link and open it in the browser Other agent CLIs also have this problem. Only automatic fix I could think of is watching the clipboard and, if it corresponds with a part of the opencode UI, editing the clipboard to remove the UI elements.
Author
Owner

@mrbm commented on GitHub (Jul 14, 2025):

shift technique does not work on a mac terminal.

@mrbm commented on GitHub (Jul 14, 2025): shift technique does not work on a mac terminal.
Author
Owner

@deadcoder0904 commented on GitHub (Jul 15, 2025):

Just a tip: in many terminal emulators, there's a key you can hold down to enable selection. In Ghostty, it's shift.

This works only till a certain point. I can't select stuff that goes out of the screen because it doesn't automatically scroll like a browser would if you reached the end of the page.

@deadcoder0904 commented on GitHub (Jul 15, 2025): > Just a tip: in many terminal emulators, there's a key you can hold down to enable selection. In Ghostty, it's `shift`. This works only till a certain point. I can't select stuff that goes out of the screen because it doesn't automatically scroll like a browser would if you reached the end of the page.
Author
Owner

@markjaquith commented on GitHub (Jul 15, 2025):

This works only till a certain point. I can't select stuff that goes out of the screen because it doesn't automatically scroll like a browser would if you reached the end of the page.

Agree... not proposing as a complete solution! Just a partial stopgap.

@markjaquith commented on GitHub (Jul 15, 2025): > This works only till a certain point. I can't select stuff that goes out of the screen because it doesn't automatically scroll like a browser would if you reached the end of the page. Agree... not proposing as a complete solution! Just a partial stopgap.
Author
Owner

@wiserfirst commented on GitHub (Jul 15, 2025):

I reckon this is a major issue with opencode.

Other agent CLIs also have this problem. Only automatic fix I could think of is watching the clipboard and, if it corresponds with a part of the opencode UI, editing the clipboard to remove the UI elements.

For me claude code works fine. I can select text as I want.

@wiserfirst commented on GitHub (Jul 15, 2025): I reckon this is a major issue with opencode. > Other agent CLIs also have this problem. Only automatic fix I could think of is watching the clipboard and, if it corresponds with a part of the opencode UI, editing the clipboard to remove the UI elements. For me claude code works fine. I can select text as I want.
Author
Owner

@likelymichael commented on GitHub (Jul 15, 2025):

this is a major blocker for me to be able to use opencode. if i can't select text, especially error outputs, this is a major issue

@likelymichael commented on GitHub (Jul 15, 2025): this is a major blocker for me to be able to use opencode. if i can't select text, especially error outputs, this is a major issue
Author
Owner

@johnpyp commented on GitHub (Jul 15, 2025):

FWIW there is a keybind for "copying a message" but it seems to not use the system copy buffer for some reason, and the keybinds aren't really intuitive. It only copies to an internal buffer it seems like.

I'd be satisfied myself with ctrl+p / ctrl + n to paginate, and yy to copy to the system buffer or something.

@johnpyp commented on GitHub (Jul 15, 2025): FWIW there is a keybind for "copying a message" but it seems to not use the system copy buffer for some reason, and the keybinds aren't really intuitive. It only copies to an internal buffer it seems like. I'd be satisfied myself with ctrl+p / ctrl + n to paginate, and yy to copy to the system buffer or something.
Author
Owner

@adamdotdevin commented on GitHub (Jul 16, 2025):

carrying the conversation on in #212

@adamdotdevin commented on GitHub (Jul 16, 2025): carrying the conversation on in #212
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#672