docs(python): Add additional python_binary example (#2728)
Have added an additional example for the `python_binary` option to show how to display the version of python from inside a local virtual environment.
This commit is contained in:
parent
ae6c69b13b
commit
eb01e1927d
|
@ -2274,6 +2274,17 @@ python_binary = "python3"
|
||||||
detect_extensions = []
|
detect_extensions = []
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
|
[python]
|
||||||
|
# Display the version of python from inside a local venv.
|
||||||
|
#
|
||||||
|
# Note this will only work when the venv is inside the project and it will only
|
||||||
|
# work in the directory that contains the venv dir but maybe this is ok?
|
||||||
|
python_binary = ["./venv/bin/python", "python", "python3", "python2"]
|
||||||
|
```
|
||||||
|
|
||||||
## Red
|
## Red
|
||||||
|
|
||||||
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/).
|
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/).
|
||||||
|
@ -2287,18 +2298,18 @@ The module will be shown if any of the following conditions are met:
|
||||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||||
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
| `symbol` | `"🔺 "` | A format string representing the symbol of Red. |
|
||||||
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
| `detect_extensions` | `["red"]` | Which extensions should trigger this module. |
|
||||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||||
| `style` | `"red bold"` | The style for the module. |
|
| `style` | `"red bold"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `red` module. |
|
| `disabled` | `false` | Disables the `red` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
| Variable | Example | Description |
|
| Variable | Example | Description |
|
||||||
| -------- | -------- | ------------------------------------ |
|
| -------- | -------- | ------------------------------------ |
|
||||||
| version | `v2.5.1` | The version of `red` |
|
| version | `v2.5.1` | The version of `red` |
|
||||||
| symbol | | Mirrors the value of option `symbol` |
|
| symbol | | Mirrors the value of option `symbol` |
|
||||||
| style\* | | Mirrors the value of option `style` |
|
| style\* | | Mirrors the value of option `style` |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue