@matheusbsbs / matheus-bagliano / commits / ba7906f2f4
Fork 0

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>

Daniel Cheng (aka SDiZ) committed Mar 30, 2009 at 19:27 UTC ba7906f2f4c332f814d270d2e16b0010516fc53e
1 file changed +2 -2
contrib/completion/git-completion.bash
+2 -2
@@ -939,7 +939,7 @@ _git_log ()
939 local cur="${COMP_WORDS[COMP_CWORD]}"
940 local g="$(git rev-parse --git-dir 2>/dev/null)"
941 local merge=""
942 - if [ -f $g/MERGE_HEAD ]; then
942 + if [ -f "$g/MERGE_HEAD" ]; then
943 merge="--merge"
944 fi
945 case "$cur" in
@@ -1681,7 +1681,7 @@ _gitk ()
1681 local cur="${COMP_WORDS[COMP_CWORD]}"
1682 local g="$(git rev-parse --git-dir 2>/dev/null)"
1683 local merge=""
1684 - if [ -f $g/MERGE_HEAD ]; then
1684 + if [ -f "$g/MERGE_HEAD" ]; then
1685 merge="--merge"
1686 fi
1687 case "$cur" in