From ffcf5a5e036d94377dd02de5c19d541bcd4b0cec Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 24 Jul 2019 13:47:46 +0200 Subject: [PATCH] completions/git: Add `git cherry` See for example: https://git-scm.com/docs/git-cherry git cherry is quite helpful when trying to findout if merges between branches are complete, when there were cherry-picks in addition to merges. --- share/completions/git.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/completions/git.fish b/share/completions/git.fish index b78675332..6b5ab3d8b 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -932,6 +932,11 @@ complete -f -c git -n '__fish_git_using_command branch' -l set-upstream-to -d 'S complete -f -c git -n '__fish_git_using_command branch' -l merged -d 'List branches that have been merged' complete -f -c git -n '__fish_git_using_command branch' -l no-merged -d 'List branches that have not been merged' +### cherry +complete -f -c git -n '__fish_git_needs_command' -a cherry -d 'Find commits yet to be applied to upstream [upstream [head]]' +complete -f -c git -n '__fish_git_using_command cherry' -s v -d 'Show the commit subjects next to the SHA1s' +complete -f -c git -n '__fish_git_using_command cherry' -a '(__fish_git_refs)' -d 'Upstream' + ### cherry-pick complete -f -c git -n '__fish_git_needs_command' -a cherry-pick -d 'Apply the change introduced by an existing commit' complete -f -c git -n '__fish_git_using_command cherry-pick' -a '(__fish_git_branches --no-merged)'