diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-09 01:42:00 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-09 01:42:00 +1200 |
commit | 95605f186fd59ec2c2e49c722373b1080d01b7a4 (patch) | |
tree | b63dab7aa0afdbe5bbe4a3a2acff3f811c7cb645 /bash/bash_completion.d | |
parent | Further refinements/extensions to Git completion (diff) | |
download | dotfiles-95605f186fd59ec2c2e49c722373b1080d01b7a4.tar.gz dotfiles-95605f186fd59ec2c2e49c722373b1080d01b7a4.zip |
Add completion for git-reset(1)
Diffstat (limited to 'bash/bash_completion.d')
-rw-r--r-- | bash/bash_completion.d/git.bash | 10 |
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 } |