SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

Can path following be achieved? #368

Closed TTT-TD closed 1 year ago

TTT-TD commented 1 year ago

I would like to be able to use the cd command in the terminal and at the same time make the remote file manager in the workspace go to the corresponding directory, please tell me how to do it.

Also, how can I use the sftp file manager in the workspace to access a directory using an absolute path?

SchoofsKelvin commented 1 year ago

By "going to the directory in the Explorer", you mean changing the root directory of the Explorer? VS Code doesn't like workspace (root) directories changing. This will e.g. restart all extensions meaning the SSH connection would also be disconnected.

That's separate from it being tricky to track cd calls in remote terminals on its own, but that's still doable.

As for absolute paths, the extension maps URIs such ssh://<config-name>/absolute/path automatically. I'm not entirely sure whether there's a convenient built-in way in VS Code to enter an absolute URI. For now, you can open a remote terminal, write the absolute path with a forward slash and ctrl-click it, or run code /absolute/path which is supported in most terminals.