From a998921f399f9657cf04313cc99e5116c6d11c98 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 13 May 2016 16:18:29 +0200 Subject: git: Complete reflog for reset --- share/completions/git.fish | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'share') diff --git a/share/completions/git.fish b/share/completions/git.fish index 234db0d7..1bdec5cc 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -199,6 +199,10 @@ function __fish_git_possible_commithash return 1 end +function __fish_git_reflog + command git reflog | string replace -r '[0-9a-f]* (.+@\{[0-9]+\}): (.*)$' '$1\t$2' +end + # general options complete -f -c git -l help -d 'Display the manual of a git command' complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a 'oneline short medium full fuller email raw format:' @@ -481,6 +485,7 @@ complete -c git -n '__fish_git_needs_command' -a reset -d 'Reset current HEAD to complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset files in working directory' complete -c git -n '__fish_git_using_command reset' -a '(__fish_git_branches)' -d 'Branch' complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_staged_files)' -d 'File' +complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_reflog)' -d 'Reflog' # TODO options ### revert -- cgit v1.2.3