code-connect
code-connect copied to clipboard
Add SSH session check, for systems with code, but also remote code
I have a laptop that I connect to remotely sometimes, and so the code
alias did not work properly due to the local install of vscode existing on that computer. This change adds a check to use the code_connect.py in the event that the connection is via SSH regardless of the existence of a remote installation of code, but works fine in non-remote terminal sessions.
Obviously if the users environment has erroneous SSH_CLIENT or SSH_TTY values set despite not using SSH, this will break, but I think that's their fault and not this script. 😉