Skip to content

Instantly share code, notes, and snippets.

@wookietreiber
Created July 12, 2017 04:10
Show Gist options
  • Save wookietreiber/6809c1b43066b9a907b2721cf707ec93 to your computer and use it in GitHub Desktop.
Save wookietreiber/6809c1b43066b9a907b2721cf707ec93 to your computer and use it in GitHub Desktop.
sbt prompt
shellPrompt := { state =>
(scala.Console.CYAN + "sbt @ %s $ " + scala.Console.RESET) format {
Project.extract(state).getOpt(sbt.Keys.name) getOrElse {
Project.extract(state).currentProject.id
}
}
}
@wookietreiber
Copy link
Author

It's quite old but it still works. There is probably a more modern way to define this with the recent sbt API changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment