diff options
| author | Ákos Uzonyi <uzonyi.akos@gmail.com> | 2020-09-25 23:11:24 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-09-26 15:30:05 -0700 |
| commit | 0bc18daa2f5d05b1b77293aef391008e07076d02 (patch) | |
| tree | 02ae10e920814d41c9c2b145f79888eb6041a470 /contrib/completion/git-completion.bash | |
| parent | c09d1280f7787020e28844e8fd615d973d2a811e (diff) | |
| download | git-0bc18daa2f5d05b1b77293aef391008e07076d02.tar.gz | |
completion: complete refs after 'git restore -s'
Currently only the long version (--source=) supports completion.
Add completion support to the short (-s) option too.
Signed-off-by: Ákos Uzonyi <uzonyi.akos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
| -rw-r--r-- | contrib/completion/git-completion.bash | 7 |
1 files changed, 7 insertions, 0 deletions
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=}" |
