Added my fish method_missing magic

pull/2/head
Bodaniel Jeanes 2009-09-27 10:46:37 +10:00
parent ebe0063cab
commit c12e4c09ea
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#!/usr/bin/env ruby
command = ARGV.shift
case command
when /^git(@|:\/\/).*\.git$/
system("git clone #{command.inspect}")
when /^(?:ftp|https?):\/\/.+\.t(?:ar\.)?gz$/
system("curl #{command.inspect} | tar xzv")
else
$stderr.puts "No default action defined in #{__FILE__.inspect}"
end

View File

@ -0,0 +1,3 @@
function method_missing --on-event fish_command_not_found
fish_method_missing $argv
end