From 3949697c0df93a209083e9c92c200c1f015e1f01 Mon Sep 17 00:00:00 2001 From: Jan Katins Date: Sat, 9 Mar 2024 08:08:29 +0100 Subject: [PATCH] docs(python): Remove a bad config example in the python (#5830) docs(python): Remove a bad config example in the python Running a unknown binary in a subfolder (called `.venv/bin/python`) has at least two drawbacks with some security implication: - In case of a unknown directory, simply cd'ing into a subdirectory could lead to starship executing a unknown binary (usually the binary MUST be in path so it's a decision taken by the user, e.g. by activating the venv) - starship would show the result of the venv python even if the venv is not active but calling `python3` on the cli would NOT run that `python3` in the venv but a different one (most likely the system python3). --- docs/config/README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index 8e2783df..1c6f626a 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -3508,7 +3508,7 @@ current [Python virtual environment](https://docs.python.org/tutorial/venv.html) 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`. -By default the module will be shown if any of the following conditions are met: +By default, the module will be shown if any of the following conditions are met: - The current directory contains a `.python-version` file - The current directory contains a `Pipfile` file @@ -3590,17 +3590,6 @@ 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'] -``` - ## R The `rlang` module shows the currently installed version of [R](https://www.r-project.org/). The module will be shown if