From 0bc18daa2f5d05b1b77293aef391008e07076d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81kos=20Uzonyi?= Date: Fri, 25 Sep 2020 23:11:24 +0200 Subject: completion: complete refs after 'git restore -s' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently only the long version (--source=) supports completion. Add completion support to the short (-s) option too. Signed-off-by: Ákos Uzonyi Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3d02bd4de7..0a96ad87e7 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2841,6 +2841,13 @@ _git_reset () _git_restore () { + case "$prev" in + -s) + __git_complete_refs + return + ;; + esac + case "$cur" in --conflict=*) __gitcomp "diff3 merge" "" "${cur##--conflict=}" -- cgit v1.2.3