From: Uzonyi Ákos <uzonyi.akos@xxxxxxxxx> Currently only the long version (--source=) supports completion. Add completion support to the short (-s) option too. Signed-off-by: Ákos Uzonyi <uzonyi.akos@xxxxxxxxx> --- contrib/completion/git-completion.bash | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 8be4a0316e..50e6e82157 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2853,6 +2853,18 @@ _git_restore () --*) __gitcomp_builtin restore ;; + *) + local prevword prevword="${words[cword-1]}" + + case "$prevword" in + -s) + __git_complete_refs + return + ;; + *) + ;; + esac + ;; esac } -- 2.28.0