Browse Source

Fix for SSH support

pull/491/head
Dan Nixon 12 years ago
parent
commit
e0521f0254
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      autoload/vundle/config.vim

+ 7
- 2
autoload/vundle/config.vim View File

@ -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


Loading…
Cancel
Save