Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5698)

Unified Diff: bash_completion

Issue 3191012: Update bash_completion to not use a temp file (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: style Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bash_completion
diff --git a/bash_completion b/bash_completion
index 6a3077c64a61e92ce26846074416d908fcd44faa..bc9988aaceaa1ee45bac46ea9294f6114f2cd91e 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 <command> argument.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698