]> git.ipfire.org Git - thirdparty/git.git/blobdiff - contrib/completion/git-completion.bash
submodule: teach set-url subcommand
[thirdparty/git.git] / contrib / completion / git-completion.bash
index 59cd3e8e90a382e647c3564bf8943e7de76e8a58..88c7446414e8e5ff4239d36da243a463029f5824 100644 (file)
@@ -1250,10 +1250,7 @@ _git_archive ()
                return
                ;;
        --*)
-               __gitcomp "
-                       --format= --list --verbose
-                       --prefix= --remote= --exec= --output
-                       "
+               __gitcomp_builtin archive "--format= --list --verbose --prefix= --worktree-attributes"
                return
                ;;
        esac
@@ -1489,6 +1486,8 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
                        --dirstat-by-file= --cumulative
                        --diff-algorithm=
                        --submodule --submodule= --ignore-submodules
+                       --indent-heuristic --no-indent-heuristic
+                       --textconv --no-textconv
 "
 
 _git_diff ()
@@ -1797,6 +1796,10 @@ _git_log ()
                __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}"
                return
                ;;
+       --no-walk=*)
+               __gitcomp "sorted unsorted" "" "${cur##--no-walk=}"
+               return
+               ;;
        --*)
                __gitcomp "
                        $__git_log_common_options
@@ -1804,16 +1807,19 @@ _git_log ()
                        $__git_log_gitk_options
                        --root --topo-order --date-order --reverse
                        --follow --full-diff
-                       --abbrev-commit --abbrev=
+                       --abbrev-commit --no-abbrev-commit --abbrev=
                        --relative-date --date=
                        --pretty= --format= --oneline
                        --show-signature
                        --cherry-mark
                        --cherry-pick
                        --graph
-                       --decorate --decorate=
+                       --decorate --decorate= --no-decorate
                        --walk-reflogs
+                       --no-walk --no-walk= --do-walk
                        --parents --children
+                       --expand-tabs --expand-tabs= --no-expand-tabs
+                       --patch
                        $merge
                        $__git_diff_common_options
                        --pickaxe-all --pickaxe-regex
@@ -2017,15 +2023,18 @@ _git_range_diff ()
        __git_complete_revlist
 }
 
+__git_rebase_inprogress_options="--continue --skip --abort --quit --show-current-patch"
+__git_rebase_interactive_inprogress_options="$__git_rebase_inprogress_options --edit-todo"
+
 _git_rebase ()
 {
        __git_find_repo_path
        if [ -f "$__git_repo_path"/rebase-merge/interactive ]; then
-               __gitcomp "--continue --skip --abort --quit --edit-todo --show-current-patch"
+               __gitcomp "$__git_rebase_interactive_inprogress_options"
                return
        elif [ -d "$__git_repo_path"/rebase-apply ] || \
             [ -d "$__git_repo_path"/rebase-merge ]; then
-               __gitcomp "--continue --skip --abort --quit --show-current-patch"
+               __gitcomp "$__git_rebase_inprogress_options"
                return
        fi
        __git_complete_strategy && return
@@ -2035,19 +2044,8 @@ _git_rebase ()
                return
                ;;
        --*)
-               __gitcomp "
-                       --onto --merge --strategy --interactive
-                       --rebase-merges --preserve-merges --stat --no-stat
-                       --committer-date-is-author-date --ignore-date
-                       --ignore-whitespace --whitespace=
-                       --autosquash --no-autosquash
-                       --fork-point --no-fork-point
-                       --autostash --no-autostash
-                       --verify --no-verify --keep-base
-                       --keep-empty --root --force-rebase --no-ff
-                       --rerere-autoupdate
-                       --exec
-                       "
+               __gitcomp_builtin rebase "" \
+                       "$__git_rebase_interactive_inprogress_options"
 
                return
        esac
@@ -2694,8 +2692,9 @@ _git_show ()
                return
                ;;
        --*)
-               __gitcomp "--pretty= --format= --abbrev-commit --oneline
-                       --show-signature
+               __gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
+                       --oneline --show-signature --patch
+                       --expand-tabs --expand-tabs= --no-expand-tabs
                        $__git_diff_common_options
                        "
                return
@@ -2780,7 +2779,7 @@ _git_submodule ()
 {
        __git_has_doubledash && return
 
-       local subcommands="add status init deinit update set-branch summary foreach sync absorbgitdirs"
+       local subcommands="add status init deinit update set-branch set-url summary foreach sync absorbgitdirs"
        local subcommand="$(__git_find_on_cmdline "$subcommands")"
        if [ -z "$subcommand" ]; then
                case "$cur" in