From 5467185db0fe31558dbb57f08135c316861a86b1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 26 Jul 2021 15:28:01 -0400 Subject: list: add a --relative-to option The current list output only shows project paths relative to the root of the repo client checkout. It can be helpful to also get a listing of paths based on other paths (e.g. the current working directory), so add an option to repo list to support that. We'll leverage this in bash completion to support completing projects by their local paths and not just remote names. Bug: https://crbug.com/gerrit/14797 Change-Id: Ia2b35d18c890217768448118b003874a1016efd4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312904 Reviewed-by: Xin Li Tested-by: Mike Frysinger --- completion.bash | 1 + 1 file changed, 1 insertion(+) (limited to 'completion.bash') diff --git a/completion.bash b/completion.bash index 04347ce3..6a5bfe1c 100644 --- a/completion.bash +++ b/completion.bash @@ -37,6 +37,7 @@ __complete_repo_list_branches() { __complete_repo_list_projects() { local repo=${COMP_WORDS[0]} "${repo}" list -n 2>/dev/null + "${repo}" list -p --relative-to=. 2>/dev/null } # Complete the repo argument. -- cgit v1.2.3-54-g00ecf