Skip to content
This repository was archived by the owner on Jul 12, 2021. It is now read-only.

Commit edb606a

Browse files
author
Maxim Fedorov
committed
Display project name instead of id in prompt
1 parent ea70c8f commit edb606a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Shell.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ object Shell {
77
import scala.Console._
88
private def decorate(msg: String, dec: String) = s"$dec$msg$RESET"
99
val prompt = (s: State) => {
10-
val project = decorate(Project.extract(s).currentProject.id, BOLD)
10+
val project = decorate(Project.extract(s).get(Keys.name), BOLD)
1111
val branch =
1212
Try {
13-
val b = "git rev-parse --abbrev-ref HEAD".!!.trim
14-
" ["+decorate(b, GREEN)+"]"
13+
val branch = "git rev-parse --abbrev-ref HEAD".!!.trim
14+
" ["+decorate(branch, GREEN)+"]"
1515
} getOrElse ""
1616

1717
s"$project$branch> "

0 commit comments

Comments
 (0)