aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
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
}