Support ~ in ssh config include

Resolves: https://github.com/tpope/vim-rhubarb/issues/79
This commit is contained in:
Tim Pope
2024-05-15 12:41:57 -04:00
parent 5b0347b523
commit 19ca61c78c

View File

@@ -1255,7 +1255,7 @@ function! s:SshParseConfig(into, root, file) abort
let host = s:SshParseHost(value) let host = s:SshParseHost(value)
elseif key ==# 'include' elseif key ==# 'include'
for glob in split(value) for glob in split(value)
if glob !~# '^/' if glob !~# '^[~/]'
let glob = a:root . glob let glob = a:root . glob
endif endif
for included in reverse(split(glob(glob), "\n")) for included in reverse(split(glob(glob), "\n"))