On Sun, Jun 06, 2021 at 01:47:25PM -0500, Felipe Contreras wrote: > Otherwise commands like 'for-each-ref' are not completed. I think you meant that options of commands like 'for-each-ref' are not completed. The command itself can be completed just fine: $ git for<TAB> for-each-ref format-patch > Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> > --- > contrib/completion/git-completion.bash | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 05606609f9..1feb2ee108 100644 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -421,7 +421,7 @@ __gitcomp_builtin () > local incl="${2-}" > local excl="${3-}" > > - local var=__gitcomp_builtin_"${cmd/-/_}" > + local var=__gitcomp_builtin_"${cmd//-/_}" > local options > eval "options=\${$var-}" > > -- > 2.31.1.2.g0532ba4bf6 >