mirror of https://github.com/sbt/sbt.git
Merge pull request #3813 from dwijnand/add-project-id-to-watching-message
Add project id to watching message
This commit is contained in:
commit
b21d0e11fb
|
|
@ -44,8 +44,13 @@ trait Watched {
|
|||
}
|
||||
|
||||
object Watched {
|
||||
val defaultWatchingMessage
|
||||
: WatchState => String = _.count + ". Waiting for source changes... (press enter to interrupt)"
|
||||
val defaultWatchingMessage: WatchState => String = ws =>
|
||||
s"${ws.count}. Waiting for source changes... (press enter to interrupt)"
|
||||
|
||||
def projectWatchingMessage(projectId: String): WatchState => String =
|
||||
ws =>
|
||||
s"${ws.count}. Waiting for source changes in project $projectId... (press enter to interrupt)"
|
||||
|
||||
val defaultTriggeredMessage: WatchState => String = const("")
|
||||
val clearWhenTriggered: WatchState => String = const(clearScreen)
|
||||
def clearScreen: String = "\u001b[2J\u001b[0;0H"
|
||||
|
|
@ -70,8 +75,8 @@ object Watched {
|
|||
* @param base The base directory from which to include files.
|
||||
* @return An instance of `Source`.
|
||||
*/
|
||||
def apply(base: File): Source =
|
||||
apply(base, AllPassFilter, NothingFilter)
|
||||
def apply(base: File): Source = apply(base, AllPassFilter, NothingFilter)
|
||||
|
||||
}
|
||||
|
||||
private[this] class AWatched extends Watched
|
||||
|
|
|
|||
|
|
@ -530,6 +530,7 @@ object Defaults extends BuildCommon {
|
|||
clean := (Def.task { IO.delete(cleanFiles.value) } tag (Tags.Clean)).value,
|
||||
consoleProject := consoleProjectTask.value,
|
||||
watchTransitiveSources := watchTransitiveSourcesTask.value,
|
||||
watchingMessage := Watched.projectWatchingMessage(thisProjectRef.value.project),
|
||||
watch := watchSetting.value
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
[@dwijnand]: https://github.com/dwijnand
|
||||
|
||||
[#2038]: https://github.com/sbt/sbt/issues/2038
|
||||
[#3813]: https://github.com/sbt/sbt/pull/3813
|
||||
|
||||
### Fixes with compatibility implications
|
||||
|
||||
### Improvements
|
||||
|
||||
- Add the current project's id to `~`'s watching message. [#2038][]/[#3813][] by [@dwijnand][]
|
||||
|
||||
### Bug fixes
|
||||
Loading…
Reference in New Issue