Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot copy to clipboard on Ubuntu 24.04 #39

Open
tallesl opened this issue Sep 9, 2024 · 6 comments
Open

Cannot copy to clipboard on Ubuntu 24.04 #39

tallesl opened this issue Sep 9, 2024 · 6 comments

Comments

@tallesl
Copy link

tallesl commented Sep 9, 2024

I'm using the v1.1.0 binary from the release section.

Here's a workaround:

$ code2prompt -o /dev/stdout my-folder/ | xclip -selection c
@Mavial
Copy link

Mavial commented Sep 14, 2024

Issue persists in v2.0.0.

@Theoabw
Copy link

Theoabw commented Sep 18, 2024

I made a workaround with ChatGPT. It's just a custom script that uses a temporary output file and uses cat to get it to the clipboard with xclip. https://chatgpt.com/share/66eadf1d-ab08-8003-8c10-385f1b4be36b

#!/bin/bash

# Create a temporary file
TMPFILE=$(mktemp)

# Run code2prompt with the provided options and save the output directly to the temp file using -o option
code2prompt "$@" -o "$TMPFILE"

# Output the contents of the file and pipe to xclip (clipboard)
cat "$TMPFILE" | xclip -selection clipboard

# Delete the temporary file
rm "$TMPFILE"

echo "Prompt copied to clipboard."

@xu-yang16
Copy link

xu-yang16 commented Oct 9, 2024

Same isssue in v2.0.0 (from cargo) for me. 6.8.0-45-generic #45~22.04.1-Ubuntu x86_64 GNU/Linux

@GregHilston
Copy link

GregHilston commented Nov 28, 2024

Same issue in v2.0. (built from source) Linux isengard 6.6.57 #1-NixOS SMP PREEMPT_DYNAMIC Thu Oct 17 13:24:38 UTC 2024 x86_64 GNU/Linux

@ODAncona
Copy link
Collaborator

ODAncona commented Feb 10, 2025

Hello,
How can I reproduce the issue ?

It's working fine for me on GNOME, KDE, plasma and wayland. I was able to use code2prompt on WSL and on ARM (jetson orin).

@GregHilston @xu-yang16 @Theoabw @Mavial @tallesl

@GregHilston
Copy link

I have since deleted my use gard Nixos install unfortunately. I can try it on my WSL2 Nixos install and report back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants