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:
Thomas O'Donnell 2021-05-17 08:43:16 +02:00 committed by GitHub
parent ae6c69b13b
commit eb01e1927d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 5 deletions

View File

@ -2274,6 +2274,17 @@ python_binary = "python3"
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
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/).