Re: [PATCH] Fix bash completion in path with spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel Cheng (aka SDiZ)" <j16sdiz+freenet@xxxxxxxxx> wrote:
> 
> Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@xxxxxxxxx>

Trivially-acked-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>

> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 1c6b0e2..e72ce24 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1103,7 +1103,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
> @@ -1943,7 +1943,7 @@ _gitk ()
>  	local cur="${COMP_WORDS[COMP_CWORD]}"
>  	local g="$(__gitdir)"
>  	local merge=""
> -	if [ -f $g/MERGE_HEAD ]; then
> +	if [ -f "$g/MERGE_HEAD" ]; then
>  		merge="--merge"
>  	fi
>  	case "$cur" in

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux