X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fcompletion%2Fgit-completion.bash;h=733ac39a32f6fd0b4f1546d429ac55c4ad6699b6;hb=5d4bd79d8002ee199c6561b2a10466c347caf2fa;hp=96517204105425ad15049d3bc713e3fbc8d86baa;hpb=b3ce9a0874cc7ec1d0fd5ead97d78a428d1fdd75;p=git.git diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 965172041..733ac39a3 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -250,7 +250,9 @@ __git_refs () refs="${cur%/*}" ;; *) - if [ -e "$dir/HEAD" ]; then echo HEAD; fi + for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do + if [ -e "$dir/$i" ]; then echo $i; fi + done format="refname:short" refs="refs/tags refs/heads refs/remotes" ;; @@ -568,6 +570,7 @@ __git_list_porcelain_commands () read-tree) : plumbing;; receive-pack) : plumbing;; reflog) : plumbing;; + remote-*) : transport;; repo-config) : deprecated;; rerere) : plumbing;; rev-list) : plumbing;; @@ -666,7 +669,7 @@ _git_am () { local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)" if [ -d "$dir"/rebase-apply ]; then - __gitcomp "--skip --resolved --abort" + __gitcomp "--skip --continue --resolved --abort" return fi case "$cur" in @@ -1306,6 +1309,24 @@ _git_name_rev () __gitcomp "--tags --all --stdin" } +_git_notes () +{ + local subcommands="edit show" + if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then + __gitcomp "$subcommands" + return + fi + + case "${COMP_WORDS[COMP_CWORD-1]}" in + -m|-F) + COMPREPLY=() + ;; + *) + __gitcomp "$(__git_refs)" + ;; + esac +} + _git_pull () { __git_complete_strategy && return @@ -1367,6 +1388,7 @@ _git_rebase () --preserve-merges --stat --no-stat --committer-date-is-author-date --ignore-date --ignore-whitespace --whitespace= + --autosquash " return @@ -2218,6 +2240,7 @@ _git () merge-base) _git_merge_base ;; mv) _git_mv ;; name-rev) _git_name_rev ;; + notes) _git_notes ;; pull) _git_pull ;; push) _git_push ;; rebase) _git_rebase ;;