Skip to content

Allow selecting text #927

Closed as duplicate
Closed as duplicate

Description

@KTibow

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.

Activity

  1. markjaquith commented on Jul 13, 2025

    @markjaquith
    Contributor

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

  2. KTibow commented on Jul 13, 2025

    @KTibow
    Author

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

  3. johnpyp commented on Jul 13, 2025

    @johnpyp

    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.

  4. Regboy744 commented on Jul 14, 2025

    @Regboy744

    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.

  5. KTibow commented on Jul 14, 2025

    @KTibow
    Author

    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.

  6. mrbm commented on Jul 15, 2025

    @mrbm

    shift technique does not work on a mac terminal.

  7. deadcoder0904 commented on Jul 15, 2025

    @deadcoder0904

    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.

  8. markjaquith commented on Jul 15, 2025

    @markjaquith
    Contributor

    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.

  9. wiserfirst commented on Jul 15, 2025

    @wiserfirst

    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.

  10. likelymichael commented on Jul 15, 2025

    @likelymichael

    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

  11. johnpyp commented on Jul 15, 2025

    @johnpyp

    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.

  12. adamdotdevin commented on Jul 16, 2025

    @adamdotdevin
    Member

    carrying the conversation on in #212

  13. crobinson42 commented on Jul 31, 2026

    @crobinson42

    Adding for future researchers - shift drag did not work on my mac, fn drag works for me.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions