Add Homebrew's shell environment to xonsh on Linux
Project description
Add Homebrew's shell environment to xonsh shell on Linux
(alternative to shellenv)
If you like the idea, ask Homebrew to implement it natively as my fix was rejected because “xonsh is far too niche”
Introduction
Homebrew has a shellenv
command to add Homebrew environment to your shell: it adds a few
environment variables (HOMEBREW_
PREFIX
/CELLAR
/REPOSITORY
) and updates a few paths (MAN
/INFO
/ PATH
). Unfortunately it doesn't support xonsh shell, and the devs are not yet willing to fix it, requiring adding the environment variables manually...
Or using this xontrib, which automatically translates the default bash output of shellenv
into xonsh
Installation
To install use pip:
xpip install xontrib-linuxbrew
# or: xpip install -U git+https://github.com/eugenesvk/xontrib-linuxbrew
Usage
Add this to your xonsh shell profile script at ~/.xonshrc
or ~/.config/rc.xsh
xontrib load linuxbrew
Set level of verbosity via $XONTRIB_LINUXBREW_LOGLEVEL
to 0–3:
- 0 print nothing (fail silently)
- 1 (default) print errors (e.g. can't find brew at default locations)
- 2 print warnings (e.g parsing errors)
- 3 print more verbose messages
Known issues
- Only default installation paths (
~/.linuxbrew
and/home/linuxbrew/.linuxbrew
) are supported
Credits
This package was created with xontrib cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for xontrib_linuxbrew-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ded0b810a4e9f3d2b824f3e8516ccb0799c6b977e531ede1e3c4c0d54288f4 |
|
MD5 | 4777f364cd171efd6a76f3b06374b2da |
|
BLAKE2b-256 | 517410e4e34539bed0283e8409c014627e5c2bf8658607a94e6a069e02602004 |