Browse Source

support gh: and github: uri shorthands

pull/10/head
gmarik 15 years ago
parent
commit
3f216f13e4
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      autoload/vundle/config.vim

+ 6
- 1
autoload/vundle/config.vim View File

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


Loading…
Cancel
Save