]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: add show --color-moved[-ws]
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 14 Jul 2020 07:44:51 +0000 (09:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jul 2020 20:51:09 +0000 (13:51 -0700)
The completion for diff command was added in fd0bc175576 but
missed the show command which also supports --color-moved[-ws].

This suffers from the very same problem [1] as the referenced
commit: no comma-separated list completion for --color-moved-ws.

[1]: https://github.com/scop/bash-completion/issues/240

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index ee468ea3b041ca573eb412739443230211cc6043..0fdb5da83bed06a4c0b9bbb7cb8876fd54774b4f 100644 (file)
@@ -2907,6 +2907,14 @@ _git_show ()
                __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}"
                return
                ;;
+       --color-moved=*)
+               __gitcomp "$__git_color_moved_opts" "" "${cur##--color-moved=}"
+               return
+               ;;
+       --color-moved-ws=*)
+               __gitcomp "$__git_color_moved_ws_opts" "" "${cur##--color-moved-ws=}"
+               return
+               ;;
        --*)
                __gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
                        --oneline --show-signature --patch