From bca106d35eabbfa64dd4e52fd9b59b152190245d Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Thu, 19 Aug 2010 16:18:42 -0700 Subject: [PATCH] Update bash_completion to not use a temp file TEST=Tested within chroot and using "repo start ooga b" Change-Id: I372d13458fb89571db4cdd7561e91c68e1563941 Review URL: http://codereview.chromium.org/3191012 --- bash_completion | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bash_completion b/bash_completion index 6a3077c64a..bc9988aace 100644 --- a/bash_completion +++ b/bash_completion @@ -200,10 +200,9 @@ _list_repo_branches() { _list_repo_projects() { local repo=${COMP_WORDS[0]} - local manifest=$(mktemp) - "$repo" manifest -o "$manifest" >& /dev/null - grep 'project name=' "$manifest" | sed 's/.\+name="\([^"]\+\)".\+/\1/' - rm -f "$manifest" >& /dev/null + "$repo" manifest -o /dev/stdout 2> /dev/null \ + | grep 'project name=' \ + | sed 's/.\+name="\([^"]\+\)".\+/\1/' } # Complete repo's argument.