From 160a79fa062de954f3f66761032cf418589f191e Mon Sep 17 00:00:00 2001 From: MaT1g3R Date: Mon, 12 Aug 2019 21:12:55 -0400 Subject: 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`. --- docs/config/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config/README.md b/docs/config/README.md index 8177cec59..1f32e2350 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -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 -- cgit v1.2.3