Add Homebrew's shell environment to xonsh on macOS/Linux
Project description
Add Homebrew's shell environment to xonsh shell on macOS/Linux
(alternative to shellenv).
If you like the idea click ⭐ on the repo and tweet. This might also accelerate adding xonsh support to Homebrew.
Introduction
Homebrew has a shellenv
command to add its environment to your shell: it adds a few
environment variables (HOMEBREW_
PREFIX
/CELLAR
/REPOSITORY
) and updates a few paths (MAN
/INFO
/ PATH
).
This xontrib automatically translates the default bash export statements of shellenv
into xonsh.
Installation
To install use pip:
xpip install xontrib-homebrew
# or: xpip install -U git+https://github.com/eugenesvk/xontrib-homebrew
Usage
Add this to your xonsh run control file (~/.xonshrc
or ~/.config/rc.xsh
):
xontrib load homebrew
Set custom Homebrew installation path via $XONTRIB_HOMEBREW_PATHBREW
to /full/path/to/bin/brew
if it's not installed at these default paths (which always take precedence):
macOS | Linux |
---|---|
/usr/local/bin/brew |
/home/linuxbrew/.linuxbrew/bin/brew |
/opt/homebrew/bin/brew |
~/.linuxbrew/bin/brew |
Set the level of verbosity via $XONTRIB_HOMEBREW_LOGLEVEL
to 0–3 (default 1):
- 0 print nothing (fail silently)
- 1 print errors (e.g. can't find
brew
at default locations) - 2 print warnings (e.g issues when parsing
shellenv
) - 3 print more verbose messages
Known issues
To be discovered.
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_homebrew-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f1ca7f1c4ece7983c737752d53629bf25cf3be1328266cbf7f24d99895cad5f |
|
MD5 | 8c955b8fe16ec1356caa28deb5a1b37e |
|
BLAKE2b-256 | 16a1b6e7e10c055ee0000f4822e051963d4b1db7e0a7bb6d3b032617641f7dbc |