[PATCH] completion: add show --color-moved[-ws]
From: Michal Privoznik <hidden>
Date: 2020-07-14 07:45:08
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Michal Privoznik <hidden>
Date: 2020-07-14 07:45:08
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- contrib/completion/git-completion.bash | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c21786f2fd..d23cf181ef 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash@@ -2732,6 +2732,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
--
2.26.2