This VS Code extension installs pbcopy and pbpaste on your remote terminal.
pbcopy: consume standard input and set it as the clipboard contents of your local computer
pbpaste: outputs clipboard contents to standard output
Example usage
ls | pbcopy
pbpaste > ls_folder_contents
How does it work?
we create a couple of small scripts, pbpaste and pbcopy
when you connect to a remote workspace, we install these to the extension folder
we update PATH for VS Code terminals to include this folder
Additional Info
For bugs and feature requests, please visit the repository on GitHub
Debugging
To debug the extension, you need to run it locally by changing a few places in code.
extension.ts blocks activation if the workspace is not connected to a remote. Comment that out temporarily.
install.ts uses process.execPath to launch the pb-paste/copy scripts.
Change it to 'node' for local development because Electron's built-in node doesn't support what we do.
Release Testing
To test the real released version of this extension, you need to connect to a remote host.
Get a remote host somewhere
Connect vs code window to it
Laptop: build a vsix package via vsce package
Copy it to the remote host: scp extension.vsix user@host