Last active
December 11, 2015 05:48
-
-
Save padde/4554541 to your computer and use it in GitHub Desktop.
Template for writing Alfred Extensions in Ruby
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
TMPFILE=".$(uuidgen).tmp.rb" | |
cat > $TMPFILE <<RUBYSCRIPT | |
# TODO: replace this with real code | |
puts "Running Ruby #{RUBY_VERSION}" | |
puts "Arguments are #{ARGV.inspect}" | |
RUBYSCRIPT | |
/usr/bin/env ruby $TMPFILE "{query}" | |
rm $TMPFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment