Skip to content

Commit ca4a300

Browse files
authored
Merge pull request #2287 from shinenelson/check-command-exists/brew
check whether `brew` command exists before aliasing
2 parents 2768b4c + 1f20569 commit ca4a300

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# shellcheck shell=bash
22
about-alias 'Some aliases for Homebrew'
33

4-
alias bup='brew update && brew upgrade'
5-
alias bout='brew outdated'
6-
alias bin='brew install'
7-
alias brm='brew uninstall'
8-
alias bcl='brew cleanup'
9-
alias bls='brew list'
10-
alias bsr='brew search'
11-
alias binf='brew info'
12-
alias bdr='brew doctor'
13-
alias bed='brew edit'
4+
if _command_exists brew; then
5+
alias bed='brew edit'
6+
alias bls='brew list'
7+
alias bsr='brew search'
8+
alias bdr='brew doctor'
9+
alias bin='brew install'
10+
alias bcl='brew cleanup'
11+
alias brm='brew uninstall'
12+
alias bout='brew outdated'
13+
alias binf='brew info'
14+
alias bup='brew update && brew upgrade'
15+
fi

0 commit comments

Comments
 (0)