diff --git a/README.md b/README.md index e7129d6..dcd121b 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ require('remote-sshfs').setup{ mounts = { base_dir = vim.fn.expand "$HOME" .. "/.sshfs/", -- base directory for mount points unmount_on_exit = true, -- run sshfs as foreground, will unmount on vim exit + remote_dir = "", -- remote directory to mount, by default home directory of connecting user }, handlers = { on_connect = { diff --git a/lua/remote-sshfs/connections.lua b/lua/remote-sshfs/connections.lua index 8fc791a..6cd3e40 100644 --- a/lua/remote-sshfs/connections.lua +++ b/lua/remote-sshfs/connections.lua @@ -119,7 +119,7 @@ M.mount_host = function(host, mount_dir, ask_pass) if host["Path"] then sshfs_cmd = sshfs_cmd .. ":" .. host["Path"] .. " " else - sshfs_cmd = sshfs_cmd .. ": " + sshfs_cmd = sshfs_cmd .. ":" .. config.mounts.remote_dir .. " " end sshfs_cmd = sshfs_cmd .. mount_dir