Completion for 'git remote update' only offers configured remote
groups. This is fine if one uses remote groups but there is no
completion without those groups.
Add all remotes to the completion when no configured groups are found.
Signed-off-by: Auke Schrijnen <auke@xxxxxxxxxxxx>
---
contrib/completion/git-completion.bash | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 8648a36..12058bf 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2298,7 +2298,11 @@ _git_remote ()
i="${i#remotes.}"
c="$c ${i/ */}"
done
- __gitcomp "$c"
+ if [ -z "$c" ]; then
+ __gitcomp "$(__git_remotes)"
+ else
+ __gitcomp "$c"
+ fi
;;
*)
COMPREPLY=()
--
1.7.6.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html