m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Added homebrew command shortcuts for installing, updating and deleting packages

Sidney Liebrand
2017-09-01 15:36:15 +02:00
parent d0b111e26c
commit 870569cb6d

@@ -12,6 +12,7 @@ Table of Contents
* [Git](#git)
* [Tags](#tags)
* [tmux](#tmux)
* [homebrew](#homebrew)
* [v](#v)
* [Inspired by v. Opens files in ~/.viminfo](#inspired-by-v-opens-files-in-viminfo)
* [With <a href="https://github.com/clvv/fasd">fasd</a>.](#with-fasd)
@@ -522,6 +523,45 @@ ftpane() {
To search for windows and show which is currently active, add [ftwind](https://github.com/pokey/dotfiles/blob/dade6c88af31458c323e8f0247af510bca7af0f5/bin/ftwind) somewhere in your path. Then add eg `bind-key f run -b ftwind` to your `tmux.conf`.
### homebrew
```sh
# Install (one or multiple) selected application(s)
# using "brew search" as source input
# mnemonic [B]rew [I]nstall [P]lugin
bip() {
local inst=$(brew search | fzf)
if [[ $inst ]]; then
brew install $inst
fi
}
```
```sh
# Update (one or multiple) selected application(s)
# mnemonic [B]rew [U]pdate [P]lugin
bup() {
local upd=$(brew leaves | fzf)
if [[ $upd ]]; then
brew upgrade $upd
fi
}
```
```sh
# Delete (one or multiple) selected application(s)
# mnemonic [B]rew [C]lean [P]lugin (e.g. uninstall)
bcp() {
local uninst=$(brew leaves | fzf)
if [[ $uninst ]]; then
brew uninstall $uninst
fi
}
```
### v
#### Inspired by [v](https://github.com/rupa/v). Opens files in ~/.viminfo