Update bash_completion to not use a temp file

TEST=Tested within chroot and using "repo start ooga b<tab>"

Change-Id: I372d13458fb89571db4cdd7561e91c68e1563941

Review URL: http://codereview.chromium.org/3191012
This commit is contained in:
Chris Sosa 2010-08-19 16:18:42 -07:00
parent 5c81cd31e5
commit bca106d35e

View File

@ -200,10 +200,9 @@ _list_repo_branches() {
_list_repo_projects() { _list_repo_projects() {
local repo=${COMP_WORDS[0]} local repo=${COMP_WORDS[0]}
local manifest=$(mktemp) "$repo" manifest -o /dev/stdout 2> /dev/null \
"$repo" manifest -o "$manifest" >& /dev/null | grep 'project name=' \
grep 'project name=' "$manifest" | sed 's/.\+name="\([^"]\+\)".\+/\1/' | sed 's/.\+name="\([^"]\+\)".\+/\1/'
rm -f "$manifest" >& /dev/null
} }
# Complete repo's <command> argument. # Complete repo's <command> argument.