mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(dart): add Dart module (#1392)
This commit is contained in:
@@ -188,6 +188,7 @@ $hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
@@ -575,6 +576,43 @@ The module will be shown if any of the following conditions are met:
|
||||
format = "via [✨ $version](bold blue) "
|
||||
```
|
||||
|
||||
## Dart
|
||||
|
||||
The `dart` module shows the currently installed version of Dart.
|
||||
The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.dart` extension
|
||||
- The current directory contains a `.dart_tool` directory
|
||||
- The current directory contains a `pubspec.yaml` or `pubspec.lock` file
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
||||
| `symbol` | `"🎯 "` | A format string representing the symbol of Dart |
|
||||
| `style` | `"bold blue"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dart` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v2.8.4` | The version of `dart` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[dart]
|
||||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
The `directory` module shows the path to your current directory, truncated to
|
||||
|
||||
@@ -28,6 +28,9 @@ discharging_symbol = ""
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[docker]
|
||||
symbol = " "
|
||||
|
||||
|
||||
Reference in New Issue
Block a user