Closed paugier closed 2 weeks ago
I would be very interested to get a feedback about this possible feature. It seems to me that it would be a very useful feature. I think I could submit a simple PR but I'd like first to get feedback about the idea.
I would be very interested to get a feedback about this possible feature. It seems to me that it would be a very useful feature. I think I could submit a simple PR but I'd like first to get feedback about the idea.
pr is always welcome. I am ok to have this feature, it is just like venv, venv should take precedence over system site packages.
Hi! I was interested in this feature as well, and I put together a PR (#1451).
How would this feature be useful?
pipx ensurepath
appends the pipx path to the user paths (https://github.com/pypa/pipx/blob/main/src/pipx/commands/ensure_path.py#L64). I understand that it is a reasonable default.However, if one wants to hide a system installed command with a pipx installed one, the pipx path needs to be prepended to
$PATH
. For example, if an old version of Mercurial is installed (/usr/bin/hg
) and I want to use a newer Mercurial managed with pipx.Describe the solution you'd like
There could be an option to ensurepath so that the pipx path would be preprended. Something like:
Note that there is
userpath.prepend
similar touserpath.append
so the implementation would be straightforward.