Copy To Clipboard is not working
Description
I selected some text from the response but its not copied to clipboard, please resolve this issue. these are my os related info.
OpenCode version
1.0.62
Steps to reproduce
- run
opencodein terminal - ask any question
- select the response text (few lines or complete)
- it shows copied to clipboard
- try to paste the (ctrl+v or cmd+v)
- paste won't work or it will paste last copied text other than this opencode
Screenshot and/or share link
Operating System
24.04
Terminal
Terminal (Default Ubuntu One) and Vscode Terminal As well
This issue might be a duplicate of existing issues. Please check:
- #3538: Unable to copy using shortcut from TUI - similar clipboard issues where text selection shows 'copied to clipboard' but doesn't actually copy
- #2413: Copy to clipboard is not working on Pop-os (closed) - very similar issue on Linux
- #2773: Clipboard copy not works in remote SSH console - similar clipboard functionality issues
Feel free to ignore if none of these address your specific case.
I have the same problem running opencode via ssh on remote machines.
it seems there is no straight forward fix for this issue, at-least please provide context menu on text selection and show copy option please..
This issue might be a duplicate of existing issues. Please check:
- Unable to copy using shortcut from TUI (opentui & current) #3538: Unable to copy using shortcut from TUI - similar clipboard issues where text selection shows 'copied to clipboard' but doesn't actually copy
- Copy to clipboard is not working on Pop-os #2413: Copy to clipboard is not working on Pop-os (closed) - very similar issue on Linux
- clipboard copy not works in remote SSH console. #2773: Clipboard copy not works in remote SSH console - similar clipboard functionality issues
Feel free to ignore if none of these address your specific case.
i've checked above, but it doesn't resolve this bug yet, please try to escalate to author and fix this bug in future release (this maybe medium priority)
i have the same issue
Same issue, found it in multiline. Paste is broken it seems, because I am getting the text from a notepad.
I'm having same issue
Same thing here, it don't work on the default terminal but it works on vs codes terminal which is weird
I have noted this issue, but it has a couple of subtleties, and its not clear how to tease them out individually.
"Select-to-copy" fails when:
- The selection (mouse-drag) is done slowly, and unidirectionally. Almost always a 'fast', one-direction-only, select action works.
- The selection (mouse-drag) is done fast but multi-directionally (when the drag action overshoots, and you go back).
Note sure if that helps.
@kommander are there any settings that might affect this feature (e.g. scroll-speed)?
I want to provide a generalized copyToClipboard from opentui, as opencode currently does that manually and it does not work remote either because of missing osc52 handling. It's on my list, please excuse the delay, just a little more patience, I'll get to it.
surprisingly, the copy to clipboard is working in iterm2, but not in-built terminal, it would be better if you look into this issue, because it was more useful for me especially (the developer like me as well)
On my Linux Mint installing xclip solved the problem:
sudo apt install xclip
Pity that the TUI doesn't warn when a dependency is missing
On my Linux Mint installing xclip solved the problem:
sudo apt install xclipPity that the TUI doesn't warn when a dependency is missing
This is crazy. What if I'm using ssh to work remotely and have NO X11 at all?
Some kind of settings is needed, then, "no X11 clipboard" or something like that.
It does both, currently, it copies to local clipboard and sends osc52 for ssh. But osc52 seems broken the way it is implemented currently and it shouldn't do both by default. It's on my list, the list is just very long, I'll get to it.
On my Linux Mint installing xclip solved the problem:
sudo apt install xclipPity that the TUI doesn't warn when a dependency is missing
Thanks man. It really worked. I hope opencode add this fix probably!
I habe the problem on windows running opencode in docker...
additional reporting from me:
when copying hello${variableName}world the ${...} is not copied (blank)
actual result: hello world
expected result: hello${variableName}world
terminal: Rio OS: Windows non WSL
it's working fine in Rio terminal on my Mac
I have it working with SSH to VM with opencode and Ubuntu 24.10. It does not work with SSH to VM with opencode and Arch Linux.
Both zsh and tmux, same tmux configuration. Still finding differences in both systems....
I have it working with SSH to VM with opencode and Ubuntu 24.10. It does not work with SSH to VM with opencode and Arch Linux.
Both zsh and tmux, same tmux configuration. Still finding differences in both systems....
Found! tmux config in Arch was not exactly the same, I was missing set -g allow-passthrough on
So at opencode 1.0.143 is working for me with "Linux" SSH to VM, tmux and opencode.