From: Daniel Cheng (aka SDiZ) Date: Mon, 30 Mar 2009 11:27:37 +0000 (+0800) Subject: Fix bash completion in path with spaces X-Git-Tag: v1.6.2.2~7^2~1^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba7906f2f4c332f814d270d2e16b0010516fc53e;p=git.git Fix bash completion in path with spaces Signed-off-by: Daniel Cheng (aka SDiZ) Trivially-acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0bb74c05e..8fc01fb49 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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 () 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