Skip to content
Discussion options

You must be logged in to vote
@aliases.register
@aliases.return_command
def _pcopy(args: list) -> list:
    try:
        args[0] = Path(args[0]).absolute().as_uri()
    except IndexError:
        pass
    return ['wl-copy', '-t', 'text/uri-list', *args]

After pcopy ./photo.jpg you can paste the file (Ctrl+V) into a file manager, browser, or chat as a real file — not a string.

Replies: 1 comment

Comment options

anki-code
May 30, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by anki-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant