Giter Club home page Giter Club logo

xontrib-homebrew's Introduction

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.

xontrib-homebrew's People

Contributors

eugenesvk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.