From 3f216f13e4ea6bfb4f36625a794a29838b2bf454 Mon Sep 17 00:00:00 2001 From: gmarik Date: Thu, 10 Mar 2011 23:04:24 -0600 Subject: [PATCH] support gh: and github: uri shorthands --- autoload/vundle/config.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 59a9cad..4e097f8 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -39,7 +39,12 @@ endf func! s:parse_name(arg) let arg = a:arg - if arg =~ '^\s*\(git@\|git://\)\S\+' || arg =~ 'https\?://' || arg =~ '\.git\s*$' + if arg =~ '^\s*\(gh\|github\):\S\+' + let uri = 'https://github.com/'.split(arg, ':')[-1] + let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') + elseif arg =~ '^\s*\(git@\|git://\)\S\+' + \ || arg =~ 'https\?://' + \ || arg =~ '\.git\s*$' let uri = arg let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') else