Created
September 13, 2024 05:43
-
-
Save sreetamdas/cb5773a4f08e95578f320bc529a379eb to your computer and use it in GitHub Desktop.
alias to selectively upgrade brew packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
alias brewup="brew update && brew outdated | rg '^[^ ]+' | fzf -m | tr '\n' ' ' | xargs brew upgrade" | |
brew update && brew outdated | rg '^[^ ]+' | fzf -m | tr '\n' ' ' | xargs brew upgrade | |
# __________________________ ___________ _______ ___________ __________________ | |
# | | | | | | |
# | | | | ---------------- pass args to brew upgrade | |
# | | | --------------------------------- join multiline results to single line | |
# | | -------------------------------------------- use fuzzy finder to select multiple packages | |
# | -------------------------------------------------------- use (rip)grep to grab outdated packages' names | |
# ------------------------------------------------------------------------------- update and list outdated packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment