Created
July 12, 2017 04:10
-
-
Save wookietreiber/6809c1b43066b9a907b2721cf707ec93 to your computer and use it in GitHub Desktop.
sbt prompt
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
shellPrompt := { state => | |
(scala.Console.CYAN + "sbt @ %s $ " + scala.Console.RESET) format { | |
Project.extract(state).getOpt(sbt.Keys.name) getOrElse { | |
Project.extract(state).currentProject.id | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's quite old but it still works. There is probably a more modern way to define this with the recent sbt API changes.