feat: Add Java Module (#314)

Implements a Java module which shows basic Java information when inside a Java project.
This commit is contained in:
Kuba Clark
2019-09-20 01:02:53 +02:00
committed by Kevin Song
parent 3eb97bd48f
commit 71f03ec3e9
11 changed files with 198 additions and 29 deletions
+26
View File
@@ -93,6 +93,7 @@ prompt_order = [
"rust",
"python",
"golang",
"java",
"nix_shell",
"cmd_duration",
"line_break",
@@ -493,6 +494,31 @@ impure_msg = "impure shell"
pure_msg = "pure shell"
```
## Java
The `java` module shows the currently installed version of Java.
The module will be shown if any of the following conditions are met:
- The current directory contains a `pom.xml` or `build.gradle` file
- The current directory contains a file with the `.java`, `.class` or `.jar` extension
### Options
| Variable | Default | Description |
| ---------- | -------------- | -------------------------------------------------------- |
| `symbol` | `"☕ "` | The symbol used before displaying the version of Java. |
| `style` | `"dimmed red"` | The style for the module. |
| `disabled` | `false` | Disables the `java` module. |
### Example
```toml
# ~/.config/starship.toml
[java]
symbol = "🌟 "
```
## NodeJS