.functions suggestion
inlife opened this issue · comments
Vladyslav Hrytsenko commented
Hey!
Maybe you are also tired of doing same over and over again:
$ brew cask search *xxx*
$ brew cask install *xxx*
Then you could try: https://gist.github.com/Inlife/2883d8aa56fbbcc47493
Have fun :3
Paul Irish commented
inlining for fun
# Search for cask, select & install
## 0.1 Inlife
function caskdo {
echo 'Searching...';
OPTIONS=($(brew cask search $1 | grep -e '^[^=]'));
if [[ "$OPTIONS" == *"No Cask found"* ]]; then
echo "Not found anything like \"$1\""
else
echo 'Select number of cask you want to install: '
select RESULT in ${OPTIONS[@]};
do
echo "Installing $RESULT";
brew cask install $RESULT;
echo "Done.";
exit;
done
fi
}
# Example
caskdo google