fix: restore the pyenv_prefix option to python (#1668)

Have restored the `pyenv_prefix` option to the python module. This is
added as a new variable that will only be shown if `pyenv` is being used
to determine the version of python that is being used.
This commit is contained in:
Thomas O'Donnell
2020-09-21 17:48:26 +02:00
committed by GitHub
parent ecd3d6e9f0
commit bb324834a5
4 changed files with 63 additions and 15 deletions
+16 -14
View File
@@ -1856,23 +1856,25 @@ The module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| -------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------- |
| `format` | `"via [${symbol}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `disabled` | `false` | Disables the `python` module. |
| Option | Default | Description |
| -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `format` | `"via [${symbol}${pyenv_prefix}${version}( \\($virtualenv\\))]($style) "` | The format for the module. |
| `symbol` | `"🐍 "` | A format string representing the symbol of Python |
| `style` | `"yellow bold"` | The style for the module. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `pyenv ` | Prefix before pyenv version display, only used if pyenv is used |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `disabled` | `false` | Disables the `python` module. |
### Variables
| Variable | Example | Description |
| ---------- | --------------- | ------------------------------------ |
| version | `"v3.8.1"` | The version of `python` |
| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
| style | `"yellow bold"` | Mirrors the value of option `style` |
| virtualenv | `"venv"` | The current `virtualenv` name |
| Variable | Example | Description |
| ------------ | --------------- | ------------------------------------------ |
| version | `"v3.8.1"` | The version of `python` |
| symbol | `"🐍 "` | Mirrors the value of option `symbol` |
| style | `"yellow bold"` | Mirrors the value of option `style` |
| pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` |
| virtualenv | `"venv"` | The current `virtualenv` name |
<details>
<summary>This module has some advanced configuration options.</summary>