fix(python)!: remove harmful `ipython` alias (#12676)
BREAKING CHANGE: the `ipython` alias was incorrectly trying to manually call
ipython from the installed module in the virtual environment, when actually
a command already exists when loading the virtual environment. This change
removes the unnecessary alias and allows calling the right command.
Fixes #12676
Diff
1diff --git a/plugins/python/README.md b/plugins/python/README.md
2index b990a26b9c1dc3b1cf28c178b567584e84592f0f..8014992de3239d43c1b7a272e802f49dabac67d5 100644
3--- a/plugins/python/README.md
4+++ b/plugins/python/README.md
5@@ -13,7 +13,6 @@ plugins=(... python)
6 | Command | Description |
7 | ---------------- | -------------------------------------------------------------------------------------- |
8 | `py` | Runs `python3`. Only set if `py` is not installed. |
9-| `ipython` | Runs the appropriate `ipython` version according to the activated virtualenv |
10 | `pyfind` | Finds .py files recursively in the current directory |
11 | `pyclean [dirs]` | Deletes byte-code and cache files from a list of directories or the current one |
12 | `pygrep <text>` | Looks for `text` in `*.py` files in the current directory, recursively |
13diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh
14index 8117452576f39909a6e98dd4d86151269842a094..63733e1de72f0298c7d7c5a0165cd49439e8e929 100644
15--- a/plugins/python/python.plugin.zsh
16+++ b/plugins/python/python.plugin.zsh
17@@ -43,9 +43,6 @@ function pyuserpaths() {
18 # Grep among .py files
19 alias pygrep='grep -nr --include="*.py"'
2021-# Run proper IPython regarding current virtualenv (if any)
22-alias ipython='python3 -c "import sys; del sys.path[0]; import IPython; sys.exit(IPython.start_ipython())"'
23-
24 # Share local directory as a HTTP server
25 alias pyserver="python3 -m http.server"
26