agemooij / sbt-prompt Goto Github PK
View Code? Open in Web Editor NEWAn SBT plugin for making your SBT prompt more awesome
License: MIT License
An SBT plugin for making your SBT prompt more awesome
License: MIT License
Would be good if it'd use the latest sbt-git.
If you do something like "git commit" and git brings up an editor (in my case vim), the editor does not display and there's no obvious way of exiting except CTRL-C which kills SBT too.
Just figure it would be very useful.....
How can I customize my Scalapenos Powerline prompt to show project name. Can't tell how to combine custom promplets along with the default ScalapenosTheme.
this is what I have for the above but need to add currentSbtKeyName
import com.scalapenos.sbt.prompt.SbtPrompt.autoImport._
promptTheme := com.scalapenos.sbt.prompt.PromptThemes.ScalapenosTheme
autoImport
extends several traits that define lots of common operations like currentSbtVersion
, currentScalaVersion
, etcetera. https://github.com/agemooij/sbt-prompt/blob/master/src/main/scala/com/scalapenos/sbt/prompt/promptlets/promptlets.scala#L16-L36
This causes name clash problems with builds that do define these names in some way or another. In my case, it failed because I had a val currentScalaVersion = "2.12.3"
in my build.sbt
.
This is an important problem. Sbt autoimports all those names and that's why it's good practice to reduce the names in autoImport
as much as possible.
Would it be possible that you remove all those clashing names from this excellent sbt plugin?
From https://underscore.io/blog/posts/2015/11/09/sbt-commands.html#latest-dependencies
Ivy dependencies allow you to select “latest.integration” as the revision number:
addSbtPlugin("org.ensime" % "ensime-sbt" % "latest.integration")
This will give you the latest and greatest version. Use it for global plugins (see below) for you development environment. Avoid it for core build dependencies because you want a reproducible build at all times.
Currently there is a difference between the way most bash/zsh prompts detect git changes and the way we do it. We only track modified files while most shells will also mark the working directory as dirty if there are untracked files.
There's probably a git command that produces the required output. The questions are:
release 1.0.0 is not showing up under the releases in GitHub.
Maybe you can do a git tag -a v1.0.0 5b144ba -m "Released version 1.0.0"
On May 1st Bintray will be sunset (https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). @agemooij do you already have plans to move sbt-prompt somewhere else?
The brownouts mentioned on that page have already started I think.
SBT inspect prints the following:
inspect promptTheme
[info] Setting: com.scalapenos.sbt.prompt.PromptTheme = PromptTheme(List(Promptlet(<function1>), Promptlet(<function1>), Promptlet(<function1>)),PromptletSeparator(<function2>))
Improve the output to replace those Function1 references with something more meaningful
Now that SBT 1.0.0 is out and SBT 0.13.16 allows for easy cross-building, this should be pretty easy.
Problem from upstream: sbt/sbt-git#110
see also sbt/sbt#2323
I'd rather not force my choice of prompt on all my co-workers, but haven't been able to get sbt-prompt working as a global plugin. I've got it so that I can inspect the promptTheme setting:
[status-app] $ inspect promptTheme
[info] Setting: com.scalapenos.sbt.prompt.PromptTheme = PromptTheme(List(Promptlet(<function1>), Promptlet(<function1>), Promptlet(<function1>), Promptlet(<function1>)),PromptletSeparator(<function2>))
[info] Description:
[info] A theme for rendering the SBT shell prompt.
[info] Provided by:
[info] {file:/Users/philip/status-app/}status-app/*:promptTheme
[info] Defined at:
[info] /Users/philip/.sbt/0.13/prompt.sbt:3
[info] Delegates:
[info] *:promptTheme
[info] {.}/*:promptTheme
[info] */*:promptTheme
[info] Related:
[info] */*:promptTheme
[status-app] $
but the prompt remains stubbornly boring.
Now it is rendered in the same color as the shell foreground, which end up withsome confusion about where the prompt stops and the current command starts, at least for somebody like me who is used to a clearer distinction.
Render the current project in a slightly darker color to make it stand out a little bit.
The default theme is now set in the projectSettings
method of the plugin, which makes it win over quite a few ways to override it on the user side.
Examples:
~/.sbt/0.13
The default value should be moved to globalSettings
, where it belongs.
Unfortunately the SBT is still terrible in explaining this ;(
I'm having troubles enabling your plugin in a play project. In our library project, it works as described. But for the play project, I always get the default prompt.
plugin.sbt
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.4")
addSbtPlugin("com.scalapenos" % "sbt-prompt" % "1.0.0")
build.sbt
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(promptTheme := ScalapenosTheme)
I tried moving the promptTheme
to the root level of the sbt file, but no effect. Am I missing something? The prompt stays at play's? default [helloWorld] $
.
I also tried to register it as a global sbt plugin.
Awesome sbt facelift. Would it make much sense automatically applying the a promptTheme
setting to all subprojects of a multi-project build definition - for cleaner sbt files? I mean, typically you would expect the same theme all over, or wouldn't you?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.