mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(rust): Display toolchain names (#3414)
This is an actualization of PR #559 as originally envisioned by qryxip. Adds the ability to display toolchain versions, either as extracted from environment/settings files or by getting the host triple. As part of this, several other major changes were needed: - Many of the smaller functions within the code have been fused, moved, or dropped. - The Rustup environmental info is now initialized lazily using OnceCells. This will hopefully lead to a performance increase. - New configuration variables (`toolchain` and `numver`) have been added to allow finer-grained configuration. - Override information is no longer read from `rustup` output. Instead, it is parsed from the same files that rustup would use to determine this info. Co-authored-by: qryxip <qryxip@gmail.com> Co-authored-by: qryxip <qryxip@gmail.com>
This commit is contained in:
@@ -2991,11 +2991,13 @@ The module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ----------------- | ------------------------------------ |
|
||||
| version | `v1.43.0-nightly` | The version of `rustc` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| --------- | ----------------- | -------------------------------------------- |
|
||||
| version | `v1.43.0-nightly` | The version of `rustc` |
|
||||
| numver | `1.51.0` | The numeric component of the `rustc` version |
|
||||
| toolchain | `beta` | The toolchain version |
|
||||
| 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user