From 9032c184f8caffac782279a00c70031a53305804 Mon Sep 17 00:00:00 2001 From: Dominic Monroe Date: Mon, 10 Apr 2017 18:21:55 +0100 Subject: [PATCH] Add ssh://git@ to origin url base (#16) --- autoload/rhubarb.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index 531f793..d9611e5 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -30,7 +30,7 @@ function! rhubarb#homepage_for_url(url) abort for domain in domains let domain_pattern .= '\|' . escape(split(domain, '://')[-1], '.') endfor - let base = matchstr(a:url, '^\%(https\=://\|git://\|git@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=$') + let base = matchstr(a:url, '^\%(https\=://\|git://\|git@\|ssh://git@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=$') if index(domains, 'http://' . matchstr(base, '^[^:/]*')) >= 0 return 'http://' . tr(base, ':', '/') elseif !empty(base)