Created
June 20, 2010 16:40
-
-
Save dasch/445941 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
comp_line = ENV["COMP_LINE"] | |
exit -1 if comp_line.nil? | |
COMMANDS = %w(server generate destroy plugin benchmarker profiler | |
console dbconsole application runner) | |
parts = comp_line.scan(/\w+/) | |
exit 0 unless parts.size == 2 | |
prefix = parts[1] | |
puts COMMANDS.select {|cmd| cmd[0, prefix.length] == prefix } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment