allow dash as github username

This commit is contained in:
gmarik 2011-04-23 00:53:34 -05:00
parent b4f37547cf
commit 1599927a43

View File

@ -41,7 +41,7 @@ endf
func! s:parse_name(arg)
let arg = a:arg
if arg =~ '^\s*\(gh\|github\):\S\+'
\ || arg =~ '^\w\+/[^/]\+$'
\ || arg =~ '^\w[a-z0-9-]\+/[^/]\+$'
let uri = 'https://github.com/'.split(arg, ':')[-1]
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
elseif arg =~ '^\s*\(git@\|git://\)\S\+'