feat: Add Crystal version module (#170)

This commit is contained in:
Youssef Habri
2020-02-05 00:27:06 +01:00
committed by GitHub
parent d4d4a01850
commit f665df226c
8 changed files with 144 additions and 0 deletions
+28
View File
@@ -116,6 +116,7 @@ prompt_order = [
"memory_usage",
"aws",
"env_var",
"crystal",
"cmd_duration",
"line_break",
"jobs",
@@ -858,6 +859,33 @@ separator = "/"
style = "bold dimmed green"
```
## Crystal
The `crystal` module shows the currently installed version of Crystal.
The module will be shown if any of the following conditions are met:
- The current directory contains a `shard.yml` file
- The current directory contains a `.cr` file
### Options
| Variable | Default | Description |
| ---------- | ------------ | ------------------------------------------------------------ |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| `style` | `"bold red"` | The style for the module. |
| `disabled` | `false` | Disables the `crystal` module. |
### Example
```toml
# ~/.config/starship.toml
[crystal]
symbol = "🔮 "
style = "bold red"
disabled = false
```
## NodeJS
The `nodejs` module shows the currently installed version of NodeJS.