1
0

Check if custom ssh config exists

This commit is contained in:
Patrick Auernig 2023-05-13 13:35:01 +02:00
parent a0475b1a85
commit a76f0153cd

View File

@ -1,12 +1,20 @@
local ssh_config = vim.fs.normalize((os.getenv("XDG_CONFIG_HOME") or "~/.config") .. "/ssh/config")
require("remote-sshfs").setup({
connections = {
ssh_configs = {
ssh_config,
},
sshfs_args = {
"-F " .. ssh_config,
local config
if vim.fn.filereadable(ssh_config) == 1 then
config = {
connections = {
ssh_configs = {
ssh_config,
},
sshfs_args = {
"-F " .. ssh_config,
}
}
}
})
else
config = {}
end
require("remote-sshfs").setup(config)