[2.x] feat: Set terminal window title when running applications#8492
Merged
eed3si9n merged 4 commits intosbt:developfrom Jan 12, 2026
Merged
[2.x] feat: Set terminal window title when running applications#8492eed3si9n merged 4 commits intosbt:developfrom
eed3si9n merged 4 commits intosbt:developfrom
Conversation
Member
|
sbt 2.x has three kinds of run (https://eed3si9n.com/sudori-part7-client-side-run-with-sbt/):
The default behavior is client-side run, which means sbt server code just sends JSON signal to sbtn, and sbtn would fork a
|
eed3si9n
reviewed
Jan 12, 2026
eed3si9n
reviewed
Jan 12, 2026
Set window title to 'sbt <command>: <org> % <name> % <version>' when running sbt run, runMain, bgRun, or bgRunMain. For server-side runs, window title is set directly. For client-side runs (sbtn), window title is passed via RunInfo protocol and set by NetworkClient. Fixes sbt#7586
af3a0cf to
8dd1e6d
Compare
eed3si9n
reviewed
Jan 12, 2026
eed3si9n
reviewed
Jan 12, 2026
eed3si9n
approved these changes
Jan 12, 2026
Member
eed3si9n
left a comment
There was a problem hiding this comment.
Some minor nits, but overall LGTM. Thanks!
9cb9dd9 to
91141ca
Compare
Set window title to 'sbt <command>: <org> % <name> % <version>' when running sbt run, runMain, bgRun, or bgRunMain. For server-side runs, window title is set directly. For client-side runs (sbtn), window title is passed via RunInfo protocol and set by NetworkClient. Fixes sbt#7586
eb7fe75 to
30c7625
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Set terminal window title when running applications
What's the problem?
When you have multiple microservices running with
sbt run, all terminal windows show the same title ("sbt run" or just "sbt"). This makes it hard to tell which service is running in which window without stopping the app or guessing from log messages.What's the fix?
Now when you run
sbt run,runMain,bgRun, orbgRunMain, the terminal window title is automatically set to show the project info:This makes it easy to identify which service is running in each terminal window at a glance.
How it works
Uses standard ANSI escape codes to set the terminal title. Only activates when running in a proper terminal (checks for
TERMenvironment variable).Testing
Fixes #7586
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=94194147