summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f4cc6f)
raw | patch | inline | side by side (parent: 9f4cc6f)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 4 Feb 2007 07:38:21 +0000 (02:38 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Feb 2007 08:18:41 +0000 (00:18 -0800) |
Now that git-show is capable of displaying any file content from any
revision and is the approved Porcelain-ish level method of doing so,
cat-file should no longer be classified as a user-level utility by
the bash completion package.
I'm also classifying the new git-reflog command as plumbing for the
time being as there are no subcommands which are really useful to
the end-user. git-gc already invokes `git reflog expire --all`,
which makes it rather unnecessary for the user to invoke it directly.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision and is the approved Porcelain-ish level method of doing so,
cat-file should no longer be classified as a user-level utility by
the bash completion package.
I'm also classifying the new git-reflog command as plumbing for the
time being as there are no subcommands which are really useful to
the end-user. git-gc already invokes `git reflog expire --all`,
which makes it rather unnecessary for the user to invoke it directly.
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 971fefb05f9858390bf624b86117bcd8c5094ac4..b87f96d9eadb0b99fbe3ce2c1e1c0e38b9601b13 100755 (executable)
#
# bash completion support for core Git.
#
-# Copyright (C) 2006 Shawn Pearce
+# Copyright (C) 2006,2007 Shawn Pearce
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
#
# The contained completion routines provide support for completing:
for i in $(git help -a|egrep '^ ')
do
case $i in
+ cat-file) : plumbing;;
check-ref-format) : plumbing;;
commit-tree) : plumbing;;
convert-objects) : plumbing;;
peek-remote) : plumbing;;
read-tree) : plumbing;;
receive-pack) : plumbing;;
+ reflog) : plumbing;;
rerere) : plumbing;;
rev-list) : plumbing;;
rev-parse) : plumbing;;
COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
}
-_git_cat_file ()
-{
- local cur="${COMP_WORDS[COMP_CWORD]}"
- case "${COMP_WORDS[0]},$COMP_CWORD" in
- git-cat-file*,1)
- COMPREPLY=($(compgen -W "-p -t blob tree commit tag" -- "$cur"))
- ;;
- git,2)
- COMPREPLY=($(compgen -W "-p -t blob tree commit tag" -- "$cur"))
- ;;
- *)
- __git_complete_file
- ;;
- esac
-}
-
_git_checkout ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
am) _git_am ;;
apply) _git_apply ;;
branch) _git_branch ;;
- cat-file) _git_cat_file ;;
checkout) _git_checkout ;;
cherry-pick) _git_cherry_pick ;;
commit) _git_commit ;;
complete -o default -F _git_am git-am
complete -o default -F _git_apply git-apply
complete -o default -F _git_branch git-branch
-complete -o default -o nospace -F _git_cat_file git-cat-file
complete -o default -F _git_checkout git-checkout
complete -o default -F _git_cherry_pick git-cherry-pick
complete -o default -F _git_commit git-commit
complete -o default -F _git_apply git-apply.exe
complete -o default -o nospace -F _git git.exe
complete -o default -F _git_branch git-branch.exe
-complete -o default -o nospace -F _git_cat_file git-cat-file.exe
complete -o default -o nospace -F _git_diff git-diff.exe
complete -o default -o nospace -F _git_diff_tree git-diff-tree.exe
complete -o default -o nospace -F _git_format_patch git-format-patch.exe