A heavily customied SBT shell prompt that shows the following information:
- a handy marker to show you are in SBT
- the current Git status (a clean working directory is green, a dirty one is yellow)
- the current project, including the root project of a multi-project build
This plugin uses some special icon-like characters (the segment separator and the Git branch icon) that are not supported by most fonts. In order for this theme to render correctly, you will need a Powerline-patched font.
You can also just replace these characters with less high-maintenance ones.
This plugin depends on the sbt-git plugin
so, before doing anything else, add it to your plugins.sbt
file.
Then just copy the ShellPrompt.scala file to the project
folder of your
project and reload/restart SBT.
Make sure your file is saved using UTF-8 encoding to prevent the special
If you want to customize the colors used in this theme, have a look at these handy references:
I might get around to turning this into a full public SBT plugin but, knowing myself and my history with planning these things, don't hold your breath ;)
Initial idea shamelessly stolen from the Play framework, all credits to them! Heavily customized aftwards based on my lightly customized version of the Oh-My-Zsh "agnoster" theme.
Enjoy!
Age (@agemooij)