Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/homebrew/homebrew-aliases
:arrow_right: Aliases for Homebrew
https://github.com/homebrew/homebrew-aliases
cmd homebrew tap
Last synced: 1 day ago
JSON representation
:arrow_right: Aliases for Homebrew
- Host: GitHub
- URL: https://github.com/homebrew/homebrew-aliases
- Owner: Homebrew
- License: bsd-2-clause
- Created: 2015-05-11T19:22:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T18:58:25.000Z (2 months ago)
- Last Synced: 2024-10-29T12:25:30.564Z (about 2 months ago)
- Topics: cmd, homebrew, tap
- Language: Ruby
- Homepage:
- Size: 157 KB
- Stars: 151
- Watchers: 12
- Forks: 31
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Homebrew Aliases
This tap allows you to alias your [Homebrew](https://brew.sh/) commands.
## Install
brew tap homebrew/aliases
## Usage
This works similar to the `alias` command:
# add aliases
$ brew alias ug='upgrade'
$ brew alias i='install'# print all aliases
$ brew alias# print one alias
$ brew alias i# use your aliases like any other command
$ brew i git# remove an alias
$ brew unalias i**Note:** Some commands are reserved and can’t be aliased (Homebrew core
commands as well as `alias` and `unalias`).## Additional Features
All aliases are prefixed with `brew`, unless they start with `!` or `%`:
# 'brew ug' -> 'brew upgrade'
$ brew alias ug=upgrade# 'brew status' -> 'git status'
$ brew alias status='!git status'**Note:** You may need single-quotes to prevent your shell from
interpreting `!`, but `%` will work for both types.# Use shell expansion to preserve a local variable
# 'brew git status' -> '/path/to/my/git status'
$ mygit=/path/to/my/git
$ brew alias git="% $mygit"Aliases can include other aliases:
$ brew alias show=info
$ brew alias print=show
$ brew print git # will run 'brew info git'Aliases can be opened in `$EDITOR` with the `--edit` flag.
# Edit alias 'brew foo'
$ brew alias foo --edit
# Assign and edit alias 'brew foo'
$ brew alias foo=bar --edit# This works too
$ brew alias --edit foo
$ brew alias --edit foo=bar# Open all aliases in EDITOR
$ brew alias --edit**Note:** If the named alias doesn't exist it will be created.