aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorDaniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>2009-03-30 19:27:37 +0800
committerJunio C Hamano <gitster@pobox.com>2009-03-30 09:07:03 -0700
commitba7906f2f4c332f814d270d2e16b0010516fc53e (patch)
tree97bbd292deb0c3723cd47ad131afce030150801a /contrib/completion/git-completion.bash
parent67f1fe5f08d3f6146cf13f8a65ceeab1509581a8 (diff)
downloadgit-ba7906f2f4c332f814d270d2e16b0010516fc53e.tar.gz
git-ba7906f2f4c332f814d270d2e16b0010516fc53e.tar.xz
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>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rwxr-xr-xcontrib/completion/git-completion.bash4
1 files changed, 2 insertions, 2 deletions
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