Last active
May 17, 2019 12:03
-
-
Save victor141516/90a8013e3cbce3cb23c992bc4a033f88 to your computer and use it in GitHub Desktop.
It mimics sshcode behaviour but using your local VSCode. Creates a vfs using sshfs then opens it using VSCode, then umounts and deletes it at VSCode close event. Add to your .bashrc/.zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sshlcode { | |
DIR=.$(echo $1 | sed 's/[@.:\/]/_/g') && \ | |
sshfs $1 $DIR && \ | |
code --new-window --wait $DIR ; \ | |
until umount $DIR; do sleep 0.1; done && \ | |
rmdir $DIR | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment