From 140009994dffdf6e975aa3f8452174f48407570a Mon Sep 17 00:00:00 2001 From: Thomas O'Donnell Date: Tue, 6 Oct 2020 09:09:06 +0200 Subject: [PATCH] docs(python): Update the python_binary option (#1731) * docs(python): Update the python_binary option Have updated the documentation to make the `python_binary` option a bit more prominent, since this is becoming a more requested requirement now that more and more systems don't have a default `python` command. * Correct order of python options --- docs/config/README.md | 49 +++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index a657e81a..5fa675dd 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1883,15 +1883,16 @@ The module will be shown if any of the following conditions are met: ### Options -| 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. | +| 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. | +| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | +| `disabled` | `false` | Disables the `python` module. | ### Variables @@ -1903,24 +1904,6 @@ The module will be shown if any of the following conditions are met: | pyenv_prefix | `"pyenv "` | Mirrors the value of option `pyenv_prefix` | | virtualenv | `"venv"` | The current `virtualenv` name | -
-This module has some advanced configuration options. - -| Variable | Default | Description | -| --------------- | -------- | ----------------------------------------------------------------------------- | -| `python_binary` | `python` | Configures the python binary that Starship executes when getting the version. | - -The `python_binary` variable changes the binary that Starship executes to get -the version of Python, it doesn't change the arguments that are used. - -```toml -# ~/.config/starship.toml - -[python] -python_binary = "python3" -``` - -
### Example @@ -1932,6 +1915,18 @@ symbol = "👾 " pyenv_version_name = true ``` +Using the `python3` binary to get the version. + +Note - The `python_binary` variable changes the binary that Starship executes +to get the version of Python, it doesn't change the arguments that are used. + +```toml +# ~/.config/starship.toml + +[python] +python_binary = "python3" +``` + ## Ruby The `ruby` module shows the currently installed version of Ruby.