Last active
August 29, 2015 14:05
-
-
Save SheffieldKevin/3089c7f88b045052de32 to your computer and use it in GitHub Desktop.
Coda run the current document in ruby plugin script
This file contains 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 | |
# This is the script code to run. It runs the script based on the file path to the script not text passed in. | |
# In Panic's "Coda Plug-in Creator" I've set the following options: | |
# Command is: Run Document | |
# Keyboard shortcut: Command-Option-R | |
# On Run: Save | |
# On Success: Nothing | |
# STDIN None | |
# STDOUT New Document | |
$stdout.flush | |
search_path = ENV['PATH'].dup | |
search_path = "/usr/local/bin:#{search_path}" | |
ENV['PATH'] = search_path | |
filepath = ENV['CODA_FILEPATH'] | |
puts `#{filepath} 2>&1` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment