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

Execute copy-command via system shell #119

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Execute copy-command via system shell #119

merged 1 commit into from
Sep 7, 2024

Conversation

LRitzdorf
Copy link
Contributor

...specifically, sh. This allows for commands with arguments, such as wl-copy -t image/png, or even more advanced shell features.

This technically also allows for arbitrary command execution, but the user already has execution privileges anyway if they're providing a copy command.

Fixes #105

@gabm
Copy link
Owner

gabm commented Sep 5, 2024

oh thats great @LRitzdorf, thank you for hunting this down.

@gabm
Copy link
Owner

gabm commented Sep 5, 2024

.. unfortunately it doesn't compile .. could you check?

@LRitzdorf
Copy link
Contributor Author

LRitzdorf commented Sep 5, 2024

...oh, duh, args() is not the same as arg(). Fix incoming.

Edit: And I even tested it locally this time!

...specifically, `sh`. This allows for commands with arguments, such as
`wl-copy -t image/png`, or even more advanced shell features.

This technically also allows for arbitrary command execution, but the
user already has execution privileges anyway if they're providing a copy
command.
@LRitzdorf
Copy link
Contributor Author

FYI, this does indeed compile now, and I've gotten around to testing the full executable on my system, where it works as expected!

@gabm
Copy link
Owner

gabm commented Sep 7, 2024

great thanks!

@gabm gabm merged commit 78b2aee into gabm:main Sep 7, 2024
3 checks passed
@LRitzdorf LRitzdorf deleted the copy-command-via-shell branch September 27, 2024 03:10
@Bykow
Copy link

Bykow commented Nov 5, 2024

Any clue when this will be released ?

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.

"No such file..." error on copy to clipboard
3 participants