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 computerpbpaste
: outputs clipboard contents to standard output
ls | pbcopy
pbpaste > ls_folder_contents
- we create a couple of small scripts,
pbpaste
andpbcopy
- 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
- For bugs and feature requests, please visit the repository on GitHub
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
usesprocess.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.
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
- Install from vsix on connected vs code window