Skip to content

Instantly share code, notes, and snippets.

@tj
Forked from jimweirich/gist:107832
Created May 7, 2009 04:35

Revisions

  1. tj revised this gist May 7, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    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|fetch|generate_index|help|install|list|lock|mirror|outdated|pristine|query|rdoc|search|server|sources|specification|stale|uninstall|unpack|update|which)$/
    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(' ')}"
  2. @jimweirich jimweirich created this gist May 7, 2009.
    12 changes: 12 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/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|fetch|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