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

Suggestion: a clipboard manager #221

Closed
lenormf opened this issue Mar 1, 2022 · 4 comments
Closed

Suggestion: a clipboard manager #221

lenormf opened this issue Mar 1, 2022 · 4 comments
Labels
Enhancement This is either an issue that describes ehcmnt./feature or a PR that introduces ehcmnt./feature Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.

Comments

@lenormf
Copy link

lenormf commented Mar 1, 2022

Hi,

It’d be nice to have a utility that allows interacting with the host clipboard in a UNIX-y manner: read on stdin via pipe, via redirection etc.

Thanks!

@patrick330602 patrick330602 added the Enhancement This is either an issue that describes ehcmnt./feature or a PR that introduces ehcmnt./feature label Mar 18, 2022
@patrick330602
Copy link
Member

Have you tried using clip.exe on WSL? Technically saying this should just work and do not need any wrapper

@lenormf
Copy link
Author

lenormf commented Mar 24, 2022

Yes, one example of why a wrapper that follows UNIX conventions would be that echo text | clip.exe doesn’t work.

@patrick330602 patrick330602 added Target: 4.x This is targeted to the 4.x release. Status: In Progress This is being worked on and not ready. labels Mar 24, 2022
@kforeverisback
Copy link

I use a bash function clip which converts the line-ending to Windows and copies to the clipboard.

clip () {
        local clip_path=/mnt/c/Windows/System32/Clip.exe
        local in=$1
        [ ! -f ${clip_path} ] && echo "${clip_path} binary not found" && return 1
        [ -z "$in" ] && in=`cat`
        echo ${in} | sed 's#\n$#\r\n#g' | ${clip_path}
}

@patrick330602
Copy link
Member

I use a bash function clip which converts the line-ending to Windows and copies to the clipboard.

clip () {
        local clip_path=/mnt/c/Windows/System32/Clip.exe
        local in=$1
        [ ! -f ${clip_path} ] && echo "${clip_path} binary not found" && return 1
        [ -z "$in" ] && in=`cat`
        echo ${in} | sed 's#\n$#\r\n#g' | ${clip_path}
}

The script you provided hangs for me interestingly
スクリーンショット 2022-03-29 午前8 57 12

@patrick330602 patrick330602 added Status: Pending Release This is fixed but not yet released. and removed Status: In Progress This is being worked on and not ready. labels Apr 19, 2022
@patrick330602 patrick330602 moved this to In progress in wslu Roadmap Jun 24, 2022
@patrick330602 patrick330602 moved this from In progress to Done in wslu Roadmap Aug 18, 2022
@patrick330602 patrick330602 added Status: Patched This is fixed and is part of a released version. and removed Status: Pending Release This is fixed but not yet released. labels Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is either an issue that describes ehcmnt./feature or a PR that introduces ehcmnt./feature Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.
Projects
Status: Done
Development

No branches or pull requests

3 participants