git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
c09d128
)
completion: complete refs after 'git restore -s'
author
Ákos Uzonyi
<redacted>
Fri, 25 Sep 2020 21:11:24 +0000
(23:11 +0200)
committer
Junio C Hamano
<redacted>
Sat, 26 Sep 2020 22:30:05 +0000
(15:30 -0700)
Currently only the long version (--source=) supports completion.
Add completion support to the short (-s) option too.
Signed-off-by: Ákos Uzonyi <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/completion/git-completion.bash
patch
|
blob
|
history
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 3d02bd4de7ee303724a97d1a71113bba4f13f4aa..0a96ad87e7b6d8723175d3b97c18921ddc737d7b 100644
(file)
--- 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=}"
git clone https://git.99rst.org/PROJECT