mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Add Java Module (#314)
Implements a Java module which shows basic Java information when inside a Java project.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user