Skip to content

Commit 9dcdbf1

Browse files
committed
support file:// scheme and repo/.git path
1 parent c2a7b49 commit 9dcdbf1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

autoload/vundle/config.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ func! s:parse_name(arg)
4545
let uri = 'https://github.com/'.split(arg, ':')[-1]
4646
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
4747
elseif arg =~ '^\s*\(git@\|git://\)\S\+'
48-
\ || arg =~ 'https\?://'
48+
\ || arg =~ '(file|https\?)://'
4949
\ || arg =~ '\.git\s*$'
50-
\ || arg =~ '\(file://\)\?[~/]'
5150
let uri = arg
52-
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
51+
let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1]
5352
else
5453
let name = arg
5554
let uri = 'https://github.com/vim-scripts/'.name.'.git'

0 commit comments

Comments
 (0)