git remote update: Fallback to remote if group does not exist
[gitweb.git] / contrib / completion / git-completion.bash
index b96458f2967ac256d6a11cc3accdb84ba464e91d..e72ce2428dd44176484ed88823dee6dd8707400c 100755 (executable)
@@ -930,9 +930,15 @@ _git_format_patch ()
 {
        local cur="${COMP_WORDS[COMP_CWORD]}"
        case "$cur" in
+       --thread=*)
+               __gitcomp "
+                       deep shallow
+                       " "" "${cur##--thread=}"
+               return
+               ;;
        --*)
                __gitcomp "
-                       --stdout --attach --no-attach --thread
+                       --stdout --attach --no-attach --thread --thread=
                        --output-directory
                        --numbered --start-number
                        --numbered-files
@@ -1097,7 +1103,7 @@ _git_log ()
        local cur="${COMP_WORDS[COMP_CWORD]}"
        local g="$(git rev-parse --git-dir 2>/dev/null)"
        local merge=""
-       if [ -f $g/MERGE_HEAD ]; then
+       if [ -f "$g/MERGE_HEAD" ]; then
                merge="--merge"
        fi
        case "$cur" in
@@ -1937,7 +1943,7 @@ _gitk ()
        local cur="${COMP_WORDS[COMP_CWORD]}"
        local g="$(__gitdir)"
        local merge=""
-       if [ -f $g/MERGE_HEAD ]; then
+       if [ -f "$g/MERGE_HEAD" ]; then
                merge="--merge"
        fi
        case "$cur" in