diff options
author | Mike Frysinger <vapier@google.com> | 2021-07-26 13:57:31 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-07-27 06:20:52 +0000 |
commit | 13d6c94cfb4783a8b92dd26c7a9b3de134d8c018 (patch) | |
tree | 103a088f98b38ca5f8b68d8a276850840fac4d72 | |
parent | 6ea0caea86f4c6b1f934b682a3aa7722e98a46f9 (diff) | |
download | git-repo-13d6c94cfb4783a8b92dd26c7a9b3de134d8c018.tar.gz |
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>
-rw-r--r-- | completion.bash | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/completion.bash b/completion.bash index 0b52d29c..3c1fd683 100644 --- a/completion.bash +++ b/completion.bash | |||
@@ -118,4 +118,6 @@ __complete_repo() { | |||
118 | return 0 | 118 | return 0 |
119 | } | 119 | } |
120 | 120 | ||
121 | complete -F __complete_repo repo | 121 | # Fallback to the default complete methods if we aren't able to provide anything |
122 | # useful. This will allow e.g. local paths to be used when it makes sense. | ||
123 | complete -F __complete_repo -o bashdefault -o default repo | ||