lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

Support for WSL with clip.exe #524

Closed AndrewKassab closed 2 years ago

AndrewKassab commented 4 years ago

I want to use lastpass-cli with my WSL terminal but unfortunately since WSL can't open graphical programs, xclip does not work. I copy things to my clipboard on WSL using clip.exe which functions just the same as using xclip so I assume it wouldn't be out of the realm to implement.

AndrewKassab commented 4 years ago

Also, even when setting LPASS_CLIPBOARD_COMMAND in my environment as clip.exe, I still don't hit the if(clipboard_command) block.

zpeschke commented 3 years ago

I'm a bit late to the party, but setting the clipboard to clip.exe works for me on WSL 2.

export LPASS_CLIPBOARD_COMMAND="clip.exe"