mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Implement configuration to display pyenv version name (#140)
This behavior can be enabled via setting `use_pyenv` to true. The "pyenv" prefix before the version name can be configured using `pyenv_prefix`.
This commit is contained in:
+11
-1
@@ -350,8 +350,13 @@ symbol = "🎁 "
|
||||
## Python
|
||||
|
||||
The `python` module shows the currently installed version of Python.
|
||||
It will also show the current Python virtual environment if one is
|
||||
|
||||
If `pyenv_version_name` is set to `true`, it will display the pyenv version name.
|
||||
|
||||
Otherwise, it will display the version number from `python --version`
|
||||
and show the current Python virtual environment if one is
|
||||
activated.
|
||||
|
||||
The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `.python-version` file
|
||||
@@ -365,6 +370,9 @@ The module will be shown if any of the following conditions are met:
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
|
||||
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
@@ -373,6 +381,8 @@ The module will be shown if any of the following conditions are met:
|
||||
|
||||
[python]
|
||||
symbol = "👾 "
|
||||
pyenv_version_name = true
|
||||
pyenv_prefix = "foo "
|
||||
```
|
||||
|
||||
## Rust
|
||||
|
||||
Reference in New Issue
Block a user