summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfb9609)
raw | patch | inline | side by side (parent: dfb9609)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 4 Nov 2006 18:57:44 +0000 (13:57 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 5 Nov 2006 01:17:46 +0000 (17:17 -0800) |
Completion for the --hard/--soft/--mixed modes of operation as
well as a ref name for <commit-ish> can be very useful and save
some fingers.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
well as a ref name for <commit-ish> can be very useful and save
some fingers.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/completion/git-completion.bash | patch | blob | history |
index b7b8a43de59f2db7ff9725d8506e1d0cb8704f6a..a3fbb9032c1849382f82a2d7f9591cbea6e0e645 100755 (executable)
esac
}
+_git_reset ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ local opt="--mixed --hard --soft"
+ COMPREPLY=($(compgen -W "$opt $(__git_refs .)" -- "$cur"))
+}
+
_git_show ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
ls-tree) _git_ls_tree ;;
pull) _git_pull ;;
push) _git_push ;;
+ reset) _git_reset ;;
show) _git_show ;;
show-branch) _git_log ;;
whatchanged) _git_log ;;
complete -o default -F _git_merge_base git-merge-base
complete -o default -o nospace -F _git_pull git-pull
complete -o default -o nospace -F _git_push git-push
+complete -o default -F _git_reset git-reset
complete -o default -F _git_show git-show
complete -o default -o nospace -F _git_log git-whatchanged