SZEDER Gábor <szeder@xxxxxxxxxx> writes: >> but e.g. "git checkout >> master<TAB>" does not add the trailing space, at all. > > I'm not sure what you mean; did you got a trailing space after > 'master<TAB>' before a31e6262 (completion: optimize refs completion, > 2011-10-15)? No. My above sentence should read "... not add the trailing space, at all, even for bash users". IOW, your understanding is correct. > We could fix the regression by not appending a space suffix to > completion words in __gitcomp_nl(), but only when the completion > script is running under zsh to avoid hurting bash users, like this: > > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 2d02a7f3..49393243 100755 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -601,6 +601,9 @@ __gitcomp_nl () > suffix="$4" > fi > fi > + if [ -n "${ZSH_VERSION-}" ] && [ "$suffix" = " " ]; then > + suffix="" > + fi > > IFS=$s > COMPREPLY=($(compgen -P "${2-}" -S "$suffix" -W "$1" -- "$cur_")) I hate to see special case for different shells, but if no one finds a better solution, then yes, this is the way to go. Not having the space may be irritating, but having the quoted space hurts really much more (I have to delete the space and the backslash manually to continue). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- 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