Browse Source

Fix bash completion in path with spaces

Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Daniel Cheng (aka SDiZ) 16 years ago committed by Junio C Hamano
parent
commit
ba7906f2f4
  1. 4
      contrib/completion/git-completion.bash

4
contrib/completion/git-completion.bash

@ -939,7 +939,7 @@ _git_log () @@ -939,7 +939,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
@ -1681,7 +1681,7 @@ _gitk () @@ -1681,7 +1681,7 @@ _gitk ()
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

Loading…
Cancel
Save