bash-completion: fallback to default completion

If we can't provide any completions, then fallback to the standard
bash & readline ones.  This allows completion based on the user's
settings (e.g. local paths) to kick in.

Bug: https://crbug.com/gerrit/14797
Test: `repo rebase ./src/<tab>` works in a CrOS checkout
Change-Id: Iced343c4fc6fd3a932aab99875c1346687d187b6
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312902
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2021-07-26 13:57:31 -04:00
parent 6ea0caea86
commit 13d6c94cfb

View File

@ -118,4 +118,6 @@ __complete_repo() {
return 0 return 0
} }
complete -F __complete_repo repo # Fallback to the default complete methods if we aren't able to provide anything
# useful. This will allow e.g. local paths to be used when it makes sense.
complete -F __complete_repo -o bashdefault -o default repo