You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an install script containing pipx ensurepath. This script has a #!/bin/bash shebang, meaning pipx is always added to $PATH in Bash. However, if someone using a shell other than Bash runs this script, the path is still only added to Bash. MacOS for example uses zsh by default.
An --all-shells flag for pipx ensurepath would be useful in my install script since pipx could then be added to all shells' $PATH, regardless of which the user uses.
I came across the following issue: #1290, which would be solved by an --all-shells flag I think.
Describe the solution you'd like
pipx uses the prepend() and append() functions from the userpath library. Both of these functions support an all_shells argument, which when set to True, sets the path for a list of pre-defined shells (https://github.com/ofek/userpath/blob/master/userpath/shells.py). This means it should be very easy to add an --all-shells flag.
I will create a PR for this. But I would obviously like to hear if you think this is a good idea!
Describe alternatives you've considered
I have not considered any alternative.
The text was updated successfully, but these errors were encountered:
How would this feature be useful?
I have an install script containing
pipx ensurepath
. This script has a#!/bin/bash
shebang, meaningpipx
is always added to$PATH
in Bash. However, if someone using a shell other than Bash runs this script, the path is still only added to Bash. MacOS for example useszsh
by default.An
--all-shells
flag forpipx ensurepath
would be useful in my install script sincepipx
could then be added to all shells'$PATH
, regardless of which the user uses.I came across the following issue: #1290, which would be solved by an
--all-shells
flag I think.Describe the solution you'd like
pipx
uses theprepend()
andappend()
functions from theuserpath
library. Both of these functions support anall_shells
argument, which when set toTrue
, sets the path for a list of pre-defined shells (https://github.com/ofek/userpath/blob/master/userpath/shells.py). This means it should be very easy to add an--all-shells
flag.I will create a PR for this. But I would obviously like to hear if you think this is a good idea!
Describe alternatives you've considered
I have not considered any alternative.
The text was updated successfully, but these errors were encountered: