aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-09-09 01:42:00 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-09 01:42:00 +1200
commit95605f186fd59ec2c2e49c722373b1080d01b7a4 (patch)
treeb63dab7aa0afdbe5bbe4a3a2acff3f811c7cb645 /bash
parentFurther refinements/extensions to Git completion (diff)
downloaddotfiles-95605f186fd59ec2c2e49c722373b1080d01b7a4.tar.gz
dotfiles-95605f186fd59ec2c2e49c722373b1080d01b7a4.zip
Add completion for git-reset(1)
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_completion.d/git.bash10
1 files changed, 10 insertions, 0 deletions
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
}