Closed kaddkaka closed 3 months ago
Please show output
complete | grep git
I have this:
$ complete | grep git
complete -o bashdefault -o default -o nospace -F __git_wrap__gitk_main gitk
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main git
$
and in some terminals I also see this empty:
$ complete | grep git
$
The described behavior occurs in both cases.
Oh, for other commands like cat
I do get a space inserted after completing the only filename matching.
For example if the only file in current is README, then cat R<tab>
-> cat README
which is desired behavior.
So perhaps this is a cross issue with git completion
remove -o nospace
just exec
complete -o bashdefault -o default -F __git_wrap__git_main git
git completion in bash inserts its own spaces, it should work even with nospace
I think this is a bug I've introduced somewhere.
Should be fixed in ff97a3c398e0163194ac1dfea9a4fb7e039c10f1
Works on my other environment at least, thanks :+1:
regular bash completion inserts a space after TAB completing when there is only one match
git rest<TAB>
->git restore
this is very convenient when continuing to writing a longer command.This script does:
git rest<TAB>
->git restore
and I'm not sure there is any reason for this difference to exist.Proposal: insert a space like bash regular completion does.