Skip to content

Instantly share code, notes, and snippets.

@tj
Forked from jimweirich/gist:107832
Created May 7, 2009 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tj/107917 to your computer and use it in GitHub Desktop.
Save tj/107917 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# Execute the git, gem, or rake command, depending on the second argument
case ARGV.first
when /^(add|bisect|branch|checkout|clone|commit|diff|fetch|grep|init|log|merge|mv|pull|push|rebase|reset|rm|show|status|tag)$/
system "git #{ARGV.join(' ')}"
when /^(build|cert|check|cleanup|contents|dependency|environment|generate_index|help|install|list|lock|mirror|outdated|pristine|query|rdoc|search|server|sources|specification|stale|uninstall|unpack|update|which)$/
system "gem #{ARGV.join(' ')}"
else
system "rake #{ARGV.join(' ')}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment