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 · 3 comments · May be fixed by #46
Open

Cannot copy to clipboard on Ubuntu 24.04 #39

tallesl opened this issue Sep 9, 2024 · 3 comments · May be fixed by #46

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

@evilwaveforms evilwaveforms linked a pull request Oct 19, 2024 that will close this issue
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.

4 participants