alehouse

April 2, 2019 ยท View on GitHub

My custom zsh-plugin for zsh inspired by betterbrew.

alehouse-zsh-plugin contains short aliases for homebrew commands. For now I just have the ones from my personal .aliases file and those from betterbrew.

The latest update adds the functionality to cd to various Homebrew locations on the filesystem using hash -d. To use just cd to its hash with ~ preceding the hash. Example:

$ cd ~taps
/usr/local/Homebrew/Library/Taps

If you have the autocd option enabled, you can simple enter the folders name with the ~ as a prefix to make things even faster!

$ ~brche
~/Library/Caches/Homebrew

This plugin is for my personal use and is always a work in progress. Feel free to use it, and dont be afraid make suggestions or offer any corrections to any mistakes you might find!

Example

Without typing full homebrew commands in console, like:

$ brew install zsh --build-from-source

there is more convenient alias:

$ bifs zsh

Installation

Installation of Alehouse is super easy! I have instructions listed below for use with oh-my-zsh. Otherwise clone this repo somewhere on your systeem, source the alehouse-plugin.zsh in your zshrc and restart your shell (source ~/.zshrc) to begin using!

oh-my-zsh

  1. Go to oh-my-zsh plugins directory:
$ cd ~/.oh-my-zsh/custom/plugins
  1. Clone the repository into a new directory alehouse :
git clone https://github.com/sticklerm3/alehouse-zsh-plugin.git alehouse
  1. Enable alehouse plugin by adding to your .zshrc configuration file:
$ plugins=(alehouse)
  1. Restart your shell.
$ source ~/.zshrc

Usage

To see a list of all available aliases just type alias into your terminal prompt.

Brew every day

The best part of waking up is having shortcuts in your cup! Some of my most used examples are listed below!

aliascommand
bsbrew search
bsdbrew search --desc
bibrew info*
bisbrew install
caskbrew cask
cicask info
ciscask install
brewupbrew -v update && brew -v upgrade && brew cask upgrade && brew -v cleanup --prune=5 && brew doctor

Cask Tools

NameUsageDescription
tokenizertokenizer path/to/appFinds the token for an application to name and create a cask.
findappcastfindappcast path/to/appFinds appcast information for the given app, if available

All Aliases

My additions

AliasCommand
bibrew info\*
bisbrew install
brdrbrew doctor
brlsbrew list
bsbrew search
bsdbrew search --desc
caskbrew cask
cibrew cask info
cisbrew cask install
cusbrew cask uninstall
cuzbrew cask zap
blvbrew leaves
  • bi currently conflicts with the bundler package currently included with omz. Comment this out if you prefer to use that one.

betterbrew aliases

aliases that are crossed out have been removed.

betterbrewCommand
binstbrew install
buinstbrew uninstall
bupdbrew update
blstbrew list
bsrchbrew search
banalbrew analytics
bcatbrew cat
bcleanbrew cleanup
bcombrew command
bcomsbrew commands
bconbrew config
bdepsbrew deps
bdescbrew desc
bdiybrew diy
bdocbrew doctor
bfetchbrew fetch
bgistbrew gist-logs
bhomebrew home
binfobrew info
bleavesbrew leaves
blnbrew ln
blogbrew log
bmigbrew migrate
bmissbrew missing
boptbrew options
boutbrew outdated
bpinbrew pin
bpinstbrew postinstall
bprunebrew prune
breadbrew readall
brinstbrew reinstall
bshbrew sh
bstylebrew style
bswitchbrew switch
btapbrew tap
btapinfobrew tap-info
btappinbrew tap-pin
btapunpinbrew tap-unpin
bulinkbrew unlink
bupackbrew unpack
bupinbrew unpin
butapbrew untap
bupdrbrew update-reset
bupgrbrew upgrade
busesbrew uses
bcachebrew --cache
bcellbrew --cellar
benvbrew --env
bprefixbrew --prefix
brepobrew --repository
bverbrew --version

Hashes

NameLocation
brewrbrew --repo
brpfxbrew --prefix
tapsbrew --taps
cellarbrew --cellar
caskroombrew --caskroom
brchebrew --cache

To-do:

  • replace alias for brew prune as its been deprecated.
  • re-organize cheatsheet to be sorted by category.