From e0521f0254afd4923df33be2e57ee38222895d5d Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Thu, 10 Jul 2014 17:13:06 +0100 Subject: [PATCH] Fix for SSH support --- autoload/vundle/config.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 5ecb30b..f23a154 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -135,10 +135,15 @@ endf func! s:parse_name(arg) let arg = a:arg let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' + if git_proto ==? 'ssh' + let github_prefix = 'git@github.com/' + else + let github_prefix = git_proto.'://github.com/' + endif if arg =~? '^\s*\(gh\|github\):\S\+' \ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' - let uri = git_proto.'://github.com/'.split(arg, ':')[-1] + let uri = github_prefix.split(arg, ':')[-1] if uri !~? '\.git$' let uri .= '.git' endif @@ -150,7 +155,7 @@ func! s:parse_name(arg) let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] else let name = arg - let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' + let uri = github_prefix.'vim-scripts/'.name.'.git' endif return {'name': name, 'uri': uri, 'name_spec': arg } endf