Fix regex

This commit is contained in:
gmarik 2011-05-23 14:30:50 -05:00
parent c1bb3797c2
commit a2c5d5442d

View File

@ -45,7 +45,7 @@ func! s:parse_name(arg)
let uri = 'https://github.com/'.split(arg, ':')[-1] let uri = 'https://github.com/'.split(arg, ':')[-1]
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
elseif arg =~? '^\s*\(git@\|git://\)\S\+' elseif arg =~? '^\s*\(git@\|git://\)\S\+'
\ || arg =~? '(file|https\?)://' \ || arg =~? '\(file\|https\?\)://'
\ || arg =~? '\.git\s*$' \ || arg =~? '\.git\s*$'
let uri = arg let uri = arg
let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1]