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

clipboard interaction issue on windows (has solution) #350

Open
dheerajbhaskar opened this issue Oct 18, 2022 · 0 comments
Open

clipboard interaction issue on windows (has solution) #350

dheerajbhaskar opened this issue Oct 18, 2022 · 0 comments

Comments

@dheerajbhaskar
Copy link

Issue:

Getting clipboard

Can't get from clipboard in windows. Reproduction steps:
gist -Ppc

Error seen:
Error: Could not find copy command, tried: pbpaste || xclip -o || xsel -o || getclip

Copying to clipboard

Reproduction steps:
gist -pc

Error seen:
`Error: Could not find copy command, tried:
pbpaste || xclip -o || xsel -o || getclip

Attempted to copy: https://gist.github.com/[REDACTED]

`

Solution

Command to get clipboard in windows

powershell "Get-Clipboard"

This works in cmd.exe as well

Command to set clipboard in windows

pipe to clip

cmd.exe

in powershell

use Set-Clipboard

Notes

  • When I've the time, I'll look into gist code and give a PR. I'm a ruby noob. In the meanwhile, it'd be great if someone can fix this for windows
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

No branches or pull requests

1 participant