#!/usr/bin/env ruby unless ARGV.size==1 puts "Example: addvim https://github.com/robgleeson/hammer.vim.git" else begin repo=ARGV.first bundle_path=repo.gsub("https://github.com/","").gsub(".git","").gsub("/","-").gsub(".vim","") system("git submodule add #{repo} vim/bundle/#{bundle_path}") rescue puts "Sorry, couldn't parse your path: #{$!}" end end