Skip to content

Commit ba7906f

Browse files
j16sdizgitster
authored andcommitted
Fix bash completion in path with spaces
Signed-off-by: Daniel Cheng (aka SDiZ) <[email protected]> Trivially-acked-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 67f1fe5 commit ba7906f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ _git_log ()
939939
local cur="${COMP_WORDS[COMP_CWORD]}"
940940
local g="$(git rev-parse --git-dir 2>/dev/null)"
941941
local merge=""
942-
if [ -f $g/MERGE_HEAD ]; then
942+
if [ -f "$g/MERGE_HEAD" ]; then
943943
merge="--merge"
944944
fi
945945
case "$cur" in
@@ -1681,7 +1681,7 @@ _gitk ()
16811681
local cur="${COMP_WORDS[COMP_CWORD]}"
16821682
local g="$(git rev-parse --git-dir 2>/dev/null)"
16831683
local merge=""
1684-
if [ -f $g/MERGE_HEAD ]; then
1684+
if [ -f "$g/MERGE_HEAD" ]; then
16851685
merge="--merge"
16861686
fi
16871687
case "$cur" in

0 commit comments

Comments
 (0)