davidolrik / sublime-rsync-ssh

Keep remote directories in sync with local projects.
75 stars 33 forks source link

ssh parameters should fall back to ssh defaults not to plugin defaults #34

Closed istr closed 9 years ago

istr commented 9 years ago

With the current setup it is not possible to leave out ssh parameters and fall back to what is configured within .ssh/config. It would be better not to enforce that (e.g. setting -p 22 when remote_port is unset) but falling back to what is configured in .ssh/config (so simply omit the parameters from the rsync call that are unset). That way the {my}.sublime-project could be shared between users and put under revision control. E.g.

.ssh/config (user foo):

Host remotedev.example.com
    HostName foo-dev.example.com
    User foo
    Port 12345
    IdentityFile ~/.ssh/dev-foo.example.id

.ssh/config (user bar):

Host remotedev.example.com
    HostName bar-dev.example.com
    User bar
    Port 54321
    IdentityFile ~/.ssh/dev-bar.example.id

{my}.sublime-project:

"remotes": {
  "/my/projectpath": [
    {
      "enabled": 1,
      "excludes":   [],
      "options": [],
      "remote_host": "remotedev.example.com",
      "remote_path": "/my/projectpath/api"
    }
  ]
}
davidolrik commented 9 years ago

Fixed in 9af52102d3879f418fce708a4f6039ec1c68d4ad

davidolrik commented 9 years ago

And now released as v1.7.1.

istr commented 9 years ago

Nice, thanks a lot... :-)

Now the only part missing is making the username optional, too. Will fork + PR for that.