Skip to content

Instantly share code, notes, and snippets.

@metasim
Created July 22, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metasim/8d6d70d5edfcbc5a20c4 to your computer and use it in GitHub Desktop.
Save metasim/8d6d70d5edfcbc5a20c4 to your computer and use it in GitHub Desktop.
SBT AutoPlugins FTW! Put this in your global sbt plugins directory to get an "openHere" command to launch the MacOS finder in the project directory.
import sbt._
import sbt.Keys.commands
object OpenFolderHere extends AutoPlugin {
override def trigger = allRequirements
override lazy val projectSettings = Seq(
commands += Command.command("openHere") { (state: State) =>
"open .".!
state
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment