git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 30, 2009, 14:39 UTC
Message-ID
<20090330143952.GB23521@spearce.org>
In-Reply-To
<1238412457-29674-1-git-send-email-j16sdiz+freenet@gmail.com>
"Daniel Cheng (aka SDiZ)" <j16sdiz+freenet@gmail.com> wrote:
> 
> Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 22 quoted lines
> 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.
Previous: Daniel Cheng (aka SDiZ)
Message 2 of 2 in “Fix bash completion in path with spaces”
  1. Fix bash completion in path with spacesDaniel Cheng (aka SDiZ), Mar 30, 2009
  2. Shawn O. PearceMar 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.