From 95605f186fd59ec2c2e49c722373b1080d01b7a4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 9 Sep 2016 01:42:00 +1200 Subject: Add completion for git-reset(1) --- bash/bash_completion.d/git.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bash') diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index 798f04e8..49313867 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -167,6 +167,16 @@ _git() { branch|checkout|merge|rebase|tag) _git refs ;; + + # I normally only want a refspec for "reset" if I'm using the --hard or + # --soft option; otherwise, files are fine + reset) + case ${COMP_WORDS[COMP_CWORD-1]} in + --hard|--soft) + _git refs + ;; + esac + ;; esac } -- cgit v1.2.3