mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
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:
parent
5c81cd31e5
commit
bca106d35e
@ -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 <command> argument.
|
||||
|
Loading…
Reference in New Issue
Block a user