Skip to content

Instantly share code, notes, and snippets.

@agleyzer
Last active August 29, 2015 14:01
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 agleyzer/5174f740a5002e02ee39 to your computer and use it in GitHub Desktop.
Save agleyzer/5174f740a5002e02ee39 to your computer and use it in GitHub Desktop.
SBT global settings (~/.sbt/global.sbt)
// should go in ~/.sbt/global.sbt
shellPrompt := { state =>
import sbt.Keys.{name, version}
import scala.Console.RESET
val YELLOW_I = "\033[0;93m"
val GREEN_I = "\033[0;92m"
val RED_I = "\033[0;91m"
val BLACK_I = "\033[0;90m"
val CYAN_I = "\033[0;96m"
val s = Project.extract(state)
"%s %s ➔ ".format(
CYAN_I + (s.getOpt(name) getOrElse s.currentProject.id) + RESET,
YELLOW_I + (s.getOpt(version) getOrElse "UNKNOWN") + RESET
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment