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

Replace xclip with xsel #3410

Merged
merged 1 commit into from
Nov 20, 2017
Merged

Replace xclip with xsel #3410

merged 1 commit into from
Nov 20, 2017

Conversation

eyqs
Copy link
Contributor

@eyqs eyqs commented Sep 16, 2017

This fixes #1812. xclip outputs Error: target STRING not available when the clipboard is empty, and xsel does not, so it might be good to just replace xclip with xsel, since they're functionally identical for our purposes.

This may also help with bug reporting, because some people get confused by the error line, even though nothing's wrong. For example, the titles of #1765 and #1931 are misleading.

Copy link
Owner

@dnschneid dnschneid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the massive delay in looking at this. Just need to fix the error message and then it can be merged.

Thanks for the patch!

else
echo -n "EUnable to open display '$current'."
echo -n "Unable to open display '$current'."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this wasn't a typo. Error messages sent to the extension are prefixed with E

| diff -q - "$cliptmp" > /dev/null; then
cat "$cliptmp" | rundisplay "$next" xclip -i -sel clip
rundisplay "$next" xsel -ib < "$cliptmp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even know how a useless use of cat snuck into the codebase to begin with. Thanks for fixing that :)

@eyqs
Copy link
Contributor Author

eyqs commented Nov 13, 2017

I amended the commit and force pushed it, not sure if that breaks anything on GitHub. Thanks for the review!

@dnschneid dnschneid merged commit 99877ea into dnschneid:master Nov 20, 2017
@dnschneid
Copy link
Owner

Yep, that's the way to do it. Thanks!

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 this pull request may close these issues.

[trusty] [stretch] xclip -o fails with "Error: target STRING not available"
2 participants