Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dyuri/xontrib-langenv
pyenv integration for xonsh
https://github.com/dyuri/xontrib-langenv
pyenv xonsh xontrib
Last synced: 19 days ago
JSON representation
pyenv integration for xonsh
- Host: GitHub
- URL: https://github.com/dyuri/xontrib-langenv
- Owner: dyuri
- License: mit
- Created: 2019-11-24T11:34:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-13T18:44:50.000Z (4 months ago)
- Last Synced: 2024-11-09T08:39:19.424Z (about 1 month ago)
- Topics: pyenv, xonsh, xontrib
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-xontribs - langenv - pyenv/nodenv/goenv/rbenv integration for xonsh. (Integrations / Prompt tweaks)
README
# xontrib-langenv
[xonsh](https://xon.sh) integration with:
* [Pyenv](https://github.com/pyenv/pyenv)
* [Nodenv](https://github.com/nodenv/nodenv)
* [Goenv](https://github.com/syndbg/goenv)
* [Rbenv](https://github.com/rbenv/rbenv)This xontrib replaces the slow `langenv` initialization with a faster python version (and skips the `rehash` step), which could save up to ~0.5s for each `lang`
The only two exceptions are:
- `goenv`, which requires an extra `rehash --only-manage-paths` [init step](https://github.com/syndbg/goenv/blob/e1007619dbb180c8f8032a9dcdb7afbeb88e848a/libexec/goenv-init#L167) to set some more [environment variables](https://github.com/syndbg/goenv/blob/e1007619dbb180c8f8032a9dcdb7afbeb88e848a/libexec/goenv-sh-rehash#L24)
- `virtualenv-init`so if you rewrite that `goenv` env var setting and `pyenv` `virtualenv` init logic in python and xontribute to this xontrib, you could eliminate the last sources of xonsh langenv startup delay!
## Install
Install using pip
```
pip install xontrib-langenv
```## Usage
Add to your `.xonshrc` as follows:
### Pyenv
```sh
xontrib load pyenv
```This xontrib initializes `pyenv` when `xonsh` is started.
After initialization `pyenv` commands works as they would do in any *classic* shell.Also supports [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv).
### Nodenv
```sh
xontrib load nodenv
```This xontrib initializes `nodenv` when `xonsh` is started.
After initialization `nodenv` commands works as they would do in any *classic* shell.### Goenv
```sh
xontrib load goenv
```This xontrib initializes `goenv` when `xonsh` is started.
After initialization `goenv` commands works as they would do in any *classic* shell.### Rbenv
```sh
xontrib load rbenv
```This xontrib initializes `rbenv` when `xonsh` is started.
After initialization `rbenv` commands works as they would do in any *classic* shell.## Compatibility notes
If you are using `xonsh` v0.11 (or older) and you have issues with the latest version of this xontrib, try to downgrade it to version 1.0.6.