mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Add instructions for nushell on MacOS, Linux and Windows
This commit is contained in:
parent
21c2a3dd69
commit
6ab9b2df3f
1 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
@ -359,6 +359,24 @@ See [Advanced configuration](#advanced-configuration) for details and more confi
|
|||
pyenv init - | source
|
||||
~~~
|
||||
|
||||
- For **Nushell**:
|
||||
|
||||
On MacOS or Linux, the path can be added like:
|
||||
|
||||
~~~ nu
|
||||
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(pyenv root)/shims")
|
||||
~~~
|
||||
|
||||
Windows users need to install [pyenv-win](https://github.com/pyenv-win/pyenv-win)
|
||||
and execute the `Get-Command pyenv` command in PowerShell to get the path of `pyenv.ps1` after the installation.
|
||||
|
||||
The result usually looks like: `C:\Users\<your-username>\.pyenv\pyenv-win\bin\pyenv.ps1`
|
||||
|
||||
Then add the path of pyenv to your Nushell PATH:
|
||||
~~~ nu
|
||||
$env.Path = ($env.Path | split row (char esep) | prepend $"~/.pyenv/pyenv-win/bin/pyenv.ps1")
|
||||
~~~
|
||||
|
||||
**Bash warning**: There are some systems where the `BASH_ENV` variable is configured
|
||||
to point to `.bashrc`. On such systems, you should almost certainly put the
|
||||
`eval "$(pyenv init -)"` line into `.bash_profile`, and **not** into `.bashrc`. Otherwise, you
|
||||
|
|
Loading…
Reference in a new issue