From 0539ba65a9f46f6b8ce6763101168775a69886f4 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 10 Jan 2010 18:23:51 +0100 Subject: [PATCH 1/1] Don't scan directories, use "brew search" and "brew list" --- brew-completion.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/brew-completion.sh b/brew-completion.sh index c0c0e4e..1bb21d2 100644 --- a/brew-completion.sh +++ b/brew-completion.sh @@ -8,9 +8,7 @@ _brew_formula() local formulae prefix prefix=`brew --prefix` - pushd "$prefix"/Library/Formula >/dev/null - formulae=`echo * | sed 's/\.rb//g'` - popd >/dev/null + formulae=`brew search` COMPREPLY=( $(compgen -W '$formulae' -- "$1") ) } @@ -19,9 +17,7 @@ _brew_formula_installed() local formulae prefix prefix=`brew --prefix` - pushd "$prefix"/Cellar >/dev/null - formulae=`echo *` - popd >/dev/null + formulae=`brew list` COMPREPLY=( $(compgen -W '$formulae' -- "$1") ) } -- 2.39.2